By using this site, you agree to have cookies stored on your device, strictly for functional purposes, such as storing your session and preferences.

Dismiss

 post.html

View raw Download
text/html • 2.72 kiB
HTML document, ASCII text
        
            
1
<dl>
2
<dt>
3
<article class="card">
4
<section class="card-main">
5
<p class="post-details"><a href="/{{ post.owner.username }}" class="post-author">{{ post.owner.username }}</a> &bull; {{ post.date | strftime("%A, %e %B %Y, %H:%M:%S") }}</p>
6
{% if level %}
7
<h2><a href="{{ post.number }}">{{ post.subject }}</a></h2>
8
{% else %}
9
<h2>{{ post.subject }}</h2>
10
{% endif %}
11
<p>
12
{{ post.message }}
13
</p>
14
{% if logged_in_user %}
15
<x-buttonbox class="box-center segmented">
16
<button onclick="vote({{ post.number }}, 1);" class="vote-button big-button" id="{{ post.number }}-voteup"><iconify-icon icon="mdi:arrow-up"></iconify-icon></button>
17
<span style="font-size: 1.5em;" class="vote-score" id="{{ post.number }}-vote">{{ post.voteSum }}</span>
18
<button onclick="vote({{ post.number }}, -1);" class="vote-button big-button" id="{{ post.number }}-votedown"><iconify-icon icon="mdi:arrow-down"></iconify-icon></button>
19
<script>vote({{ post.number }}, 0);</script>
20
</x-buttonbox>
21
{% endif %}
22
</section>
23
</article>
24
</dt>
25
{% if logged_in_user %}
26
<dd>
27
<details class="reply-area">
28
<summary>{% trans %}Reply{% endtrans %}</summary>
29
30
<form method="POST" action="{{ post.number }}/reply">
31
<x-vbox>
32
<x-vbox class="nopad">
33
<label for="{{ post.number }}-subject">{% trans %}Subject{% endtrans %}</label>
34
<input id="{{ post.number }}-subject" name="subject" value="Re: {{ post.subject }}" required>
35
</x-vbox>
36
<textarea name="message" style="box-sizing: border-box;" rows="8" required></textarea>
37
<x-buttonbox>
38
<button type="submit">{% trans %}Submit{% endtrans %}</button>
39
</x-buttonbox>
40
</x-vbox>
41
</form>
42
</details>
43
</dd>
44
{% endif %}
45
{% set level = level + 1 %}
46
{% if level <= max_post_nesting %}
47
{% if post.children %}
48
{% for post in Post.query.filter_by(parent=post).order_by(Post.date) %}
49
<dd>{% include "post.html" %}</dd>
50
{% endfor %}
51
{% endif %}
52
{% elif post.children %}
53
<dd>
54
<a href="{{ post.number }}">{% trans %}Comments hidden; click to go deeper.{% endtrans %}</a>
55
</dd>
56
{% endif %}
57
</dl>
58