point-tools/templates/Web/Post/post.html.twig

49 lines
1.7 KiB
Twig

<div class="container post-block">
<div class="row">
<div class="col-xs-1">
<img src="{{ point_avatar_large(post.author.login) }}" alt="Avatar">
</div>
<div class="col-xs-11">
<div><a href="{{ path('user_show', {'login': post.author.login}) }}">@{{ post.author.login }}</a></div>
<div class="post-date">{{ post.createdAt|date('j M Y G:i') }}</div>
<div>
{% for pt in post.postTags %}
<span class="tag">{{ pt.text }}</span>
{% endfor %}
</div>
</div>
</div>
<div class="row post-text">
<div class="col-xs-12">
{# Until Point native Markdown parser is ported, use Twig's parser #}
{# {{ post.text|markdown('app.point.markdown_parser') }}#}
{{ post.text | markdown_to_html }}
</div>
</div>
<div class="row post-files">
<div class="col-xs-2">
{% for file in post.files %}
<div class="post-attachment">
<a href="{{ file.remoteUrl }}" class="post-image"><img src="{{ file.remoteUrl }}" class="img-thumbnail" /></a>
</div>
{% endfor %}
</div>
</div>
<div class="row">
<div class="col-xs-12"><a href="{{ post.id|point_post_url }}" class="post">#{{ post.id }}</a></div>
</div>
{% if is_feed is not defined and post.comments|length > 0 %}
<div class="row comments">
{#
{% include 'Web/Post/comments_tree.html.twig' with {
'comments': post.firstLevelComments
} only %}
#}
{% include 'Web/Post/comments_list.html.twig' with {
'comments': post.comments
} %}
</div>
{% endif %}
</div>