grav-plugin-comments/templates/partials/comments.html.twig

38 lines
1.1 KiB
Twig
Raw Normal View History

{% if grav.twig.enable_comments_plugin %}
2017-05-11 17:42:43 +00:00
{% set scope = scope ?: 'data.' %}
2015-10-07 18:18:44 +00:00
2017-10-19 16:53:40 +00:00
{% include 'partials/comments.form.html.twig' %}
2015-10-13 21:39:13 +00:00
{% if grav.twig.comments|length %}
<h3>{{'PLUGIN_COMMENTS.COMMENTS'|t}}</h3>
2017-10-19 16:53:40 +00:00
<div class="row comments">
{% for comment in grav.twig.comments|array_reverse %}
2017-10-19 16:53:40 +00:00
<div class="media media-level-{{comment.level|e}}" data-Id="{{comment.id}}" >
<div class="media-left">
<a href="#">
<img class="media-object" style="width:100px;" src="https://www.gravatar.com/avatar/{{comment.email|trim|lower|md5}}?d=identicon" alt="user icon">
</a>
</div>
<div class="media-body">
<h4 class="media-heading">{{comment.title}}</h4>
<div class="">
<a class="reply-link" href="#">Reply</a>
</div>
<div class="">
{{'PLUGIN_COMMENTS.WRITTEN_ON'|t}} {{comment.date|e}} {{'PLUGIN_COMMENTS.BY'|t}} {{comment.author}}
</div>
<div class="media-text" >
{{comment.text}}
</div>
{{nested}}
</div>
</div>
{% endfor %}
2017-10-19 16:53:40 +00:00
</div>
{% endif %}
{% endif %}
2017-10-19 16:53:40 +00:00