{% macro render_entry(entry, clickable_date) %}
<div class="entry">
    {{ entry.content_html|safe }}
    </br>
    <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 %}