You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.8 KiB
57 lines
1.8 KiB
{% macro render_entry(entry, clickable_date) %}
|
|
<div class="entry">
|
|
{{ entry.content_html|safe }}
|
|
{% if
|
|
(request.cookies.get('display_entry_favorite_count') == 'true') or
|
|
(request.cookies.get('display_entry_author') == 'true') or
|
|
(request.cookies.get('display_entry_datetime') == 'true')
|
|
%}
|
|
</br>
|
|
{% endif %}
|
|
<div style="text-align: right;">
|
|
{% if request.cookies.get('display_entry_favorite_count') == 'true' %}
|
|
<small>{{ entry.favorite_count }} favorites</small>
|
|
{% endif %}
|
|
{% if request.cookies.get('display_entry_author') == 'true' %}
|
|
{% if request.cookies.get('display_entry_favorite_count') == 'true' %}
|
|
-
|
|
{% endif %}
|
|
<small>
|
|
<a href="{{ url_for('author', nickname=entry.author) }}">
|
|
{{ entry.author }}
|
|
</a>
|
|
</small>
|
|
{% endif %}
|
|
{% if request.cookies.get('display_entry_datetime') == 'true' %}
|
|
{% if request.cookies.get('display_entry_author') == 'true' %}
|
|
-
|
|
{% elif request.cookies.get('display_entry_favorite_count') == 'true' %}
|
|
-
|
|
{% endif %}
|
|
<small>
|
|
{% if clickable_date %}
|
|
<a href="{{ url_for('entry', id=entry.id) }}">
|
|
{{ entry.datetime }}
|
|
</a>
|
|
{% else %}
|
|
{{ entry.datetime }}
|
|
{% endif %}
|
|
</small>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endmacro %}
|
|
|
|
{% macro render_gundem(topic) %}
|
|
<a href="{{ url_for('topic', path=topic.path, a='popular') }}" class="entry">
|
|
<div style="display: flex; justify-content: space-between;">
|
|
<div>{{ topic.title }}</div>
|
|
<div>
|
|
{% if topic.pinned %}<small style="opacity: 0.5;">pinned</small>{% endif %}
|
|
{% if topic.entry_count %}
|
|
<small style="opacity: 0.5;">{{ topic.entry_count }}</small>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</a>
|
|
{% endmacro %}
|
|
|