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