{% if post.link|length > 0 %}
{{ post.title }}
{% else %}
{{ post.title }}
{% endif %}
{%
include 'vote.twig' with {
target: 'post',
hash_id: post.hashId,
vote: votes.post[post.id] is defined ? votes.post[post.id].vote : null,
vote_count: post.vote,
user: user is defined ? user : null
} only
%}
by {{ post.username }} {{ post.created|ago }}
— {{ post.vote }} votes, {{ post.commentsCount }} comments
{% if user and post.userId == user.id %}
— Edit
{% endif %}
{{ post.text|markdown|raw }}
{% if user %}
{# "shortcut-submit" is a class used exclusively from javascript
# to submit the form when a key (Ctrl+Enter) is pressed.
#}
{% endif %}
{# id="" used as anchor #}
{% include 'comment.twig' with {
'post': post,
'comments': comments,
'votes': votes.comment,
'parent_id': 0,
'depth': 0
} %}