{% if post.link and post.link|length > 0 %}
{{ post.title }}
{% else %}
{{ post.title }}
{% endif %}
{% if post.link %}
{{ post.link|netloc }}
{% endif %}
{% for topic in topics %}
{{ topic.name }}
{% endfor %}
{{ vote ('post', post, user) }}
{{ post.username }}
—
{{ post.vote }} votes, {{ post.commentsCount }} comments
—
{% if not show_source %}
Source
{% endif%}
{% if user and post.userId == user.id %}
Edit
{% endif %}
{% if show_source %}
{# "shortcut-submit" is a class used exclusively from javascript
# to submit the form when a key (Ctrl+Enter) is pressed.
#}
{# id="" used as anchor #}
{{ post.text }}
{% else %}
{{ post.text|md2html|safe }}
{% endif %}
{% for comment in comments %}
{# The id="" is used as anchor #}
{% endfor %}
{{ vote ('comment', comment, user) }}
{# Username #}
{{ comment.username }}
{# DateTime #}
{% if user %}
—
{# Reply #}
Reply
{# Edit #}
{% if comment.userId == user.id %}
Edit
{% endif %}
{% endif %}
{% if show_source %}
{{ comment.text }}
{% else %}
{{ comment.text|md2html|safe }}
{% endif %}