web: add entry.html template
parent
90f8c9ad1a
commit
c209db8ebc
|
@ -0,0 +1,53 @@
|
|||
<table class="headers" title="E-mail headers">
|
||||
<caption class="screen-reader-only">E-mail headers</caption>
|
||||
{% if is_root %}
|
||||
<tr>
|
||||
<th scope="row">List:</th>
|
||||
<td class="faded">{{ list.id }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr>
|
||||
<th scope="row">From:</th>
|
||||
<td>{{ post.address }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
{% if is_root %}
|
||||
<tr>
|
||||
<th scope="row">To:</th>
|
||||
<td class="faded">{{ post.to }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Subject:</th>
|
||||
<td>{{ trimmed_subject }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<th scope="row">Date:</th>
|
||||
<td class="faded">{{ post.datetime }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
{% if is_root %}
|
||||
{% if in_reply_to %}
|
||||
<tr>
|
||||
<th scope="row">In-Reply-To:</th>
|
||||
<td class="faded message-id"><a href="{{ root_url_prefix }}{{ list_post_path(list.id, in_reply_to) }}">{{ in_reply_to }}</a></td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if references %}
|
||||
<tr>
|
||||
<th scope="row">References:</th>
|
||||
<td>{% for r in references %}<span class="faded message-id"><a href="{{ root_url_prefix }}{{ list_post_path(list.id, r) }}">{{ r }}</a></span>{% endfor %}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<th scope="row">Message-ID:</th>
|
||||
<td class="faded message-id"><a href="{{ root_url_prefix }}{{ list_post_path(list.id, post.message_id) }}">{{ strip_carets(post.message_id) }}</a></td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr>
|
||||
<td colspan="2"><details class="reply-details"><summary>more …</summary><a href="{{ root_url_prefix }}{{ post_raw_path(list.id, post.message_id) }}">View raw</a> <a href="{{ root_url_prefix }}{{ post_eml_path(list.id, post.message_id) }}">Download as <code>eml</code> (RFC 5322 format)</a></details></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="post-body">
|
||||
<pre {% if odd %}style="--background-secondary: var(--background-critical);" {% endif %}title="E-mail text content">{{ body }}</pre>
|
||||
</div>
|
||||
|
|
@ -1,66 +1,13 @@
|
|||
{% include "header.html" %}
|
||||
<div class="body">
|
||||
<table class="headers" title="E-mail headers">
|
||||
<caption class="screen-reader-only">E-mail headers</caption>
|
||||
<tr>
|
||||
<th scope="row">List:</th>
|
||||
<td class="faded">{{ list.id }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">From:</th>
|
||||
<td>{{ from }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">To:</th>
|
||||
<td class="faded">{{ to }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Subject:</th>
|
||||
<td>{{ trimmed_subject }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Date:</th>
|
||||
<td class="faded">{{ date }}</td>
|
||||
</tr>
|
||||
{% if in_reply_to %}
|
||||
<tr>
|
||||
<th scope="row">In-Reply-To:</th>
|
||||
<td class="faded message-id"><a href="{{ root_url_prefix }}{{ list_post_path(list.id, in_reply_to) }}">{{ in_reply_to }}</a></td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if references %}
|
||||
<tr>
|
||||
<th scope="row">References:</th>
|
||||
<td>{% for r in references %}<span class="faded message-id"><a href="{{ root_url_prefix }}{{ list_post_path(list.id, r) }}">{{ r }}</a></span>{% endfor %}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</table>
|
||||
<div class="post-body">
|
||||
<pre title="E-mail text content">{{ body }}</pre>
|
||||
</div>
|
||||
{% set is_root = true %}
|
||||
{% with post = { 'address': from, 'to': to, 'datetime': date, 'message_id': message_id } %}
|
||||
{% include 'lists/entry.html' %}
|
||||
{% endwith %}
|
||||
{% set is_root = false %}
|
||||
{% for (depth, post, body, date) in thread %}
|
||||
<table class="headers" title="E-mail headers">
|
||||
<caption class="screen-reader-only">E-mail headers</caption>
|
||||
<tr>
|
||||
<th scope="row">From:</th>
|
||||
<td>{{ post.address }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Date:</th>
|
||||
<td class="faded">{{ date }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Message-ID:</th>
|
||||
<td class="faded message-id"><a href="{{ root_url_prefix }}{{ list_post_path(list.id, post.message_id) }}">{{ strip_carets(post.message_id) }}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><details class="reply-details"><summary>more …</summary><a href="{{ root_url_prefix }}{{ post_raw_path(list.id, post.message_id) }}">View raw</a> <a href="{{ root_url_prefix }}{{ post_eml_path(list.id, post.message_id) }}">Download as <code>eml</code> (RFC 5322 format)</a></details></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="post-body">
|
||||
<pre title="E-mail text content">{{ body }}</pre>
|
||||
</div>
|
||||
|
||||
{% set odd = loop.index % 2 == 1 %}
|
||||
{% include 'lists/entry.html' %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% include "footer.html" %}
|
||||
|
|
Loading…
Reference in New Issue