1 {% macro render_thread(thread, current_user) -%}
3 <ul class="comments mt-4 mb-0">
4 {% for r in thread.replies %}
5 <li class="row my-2 mx-0">
6 <div class="col-md-1 p-1">
7 <a href="{{ url_for('user_profile_page', username=r.author.username) }}">
8 <img class="img-responsive user-photo img-thumbnail img-thumbnail-1" src="{{ (r.author.email or '') | gravatar }}">
13 <div class="card-header">
14 <a class="author {{ r.author.rank.name }}"
15 href="{{ url_for('user_profile_page', username=r.author.username) }}">
16 {{ r.author.display_name }}
18 <a name="reply-{{ r.id }}" class="text-muted float-right"
19 href="{{ url_for('thread_page', id=thread.id) }}#reply-{{ r.id }}">
20 {{ r.created_at | datetime }}
24 <div class="card-body">
25 {{ r.comment | markdown }}
33 {% if current_user.is_authenticated %}
34 <div class="row mt-0 mb-4 comments mx-0">
35 <div class="col-md-1 p-1">
36 <img class="img-responsive user-photo img-thumbnail img-thumbnail-1" src="{{ (current_user.email or '') | gravatar }}">
40 <div class="card-header {{ current_user.rank.name }}">
41 {{ current_user.display_name }}
45 <form method="post" action="{{ url_for('thread_page', id=thread.id)}}" class="card-body">
46 <input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
47 <textarea class="form-control markdown" required maxlength=500 name="comment"></textarea><br />
48 <input class="btn btn-primary" type="submit" value="Comment" />
56 {% macro render_threadlist(threads, list_group=False) -%}
57 {% if not list_group %}<ul>{% endif %}
58 <li {% if list_group %}class="list-group-item"{% endif %}>
59 {% for t in threads %}
61 <a href="{{ url_for('thread_page', id=t.id) }}">
62 {% if t.private %}🔒 {% endif %}
64 by {{ t.author.display_name }}
67 {% if t.private %}🔒 {% endif %}
68 <a href="{{ url_for('thread_page', id=t.id) }}">{{ t.title }}</a>
69 by {{ t.author.display_name }}
72 <i>No threads found</i>