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

42 lines
1.6 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-24 00:57:44 +00:00
<a class="comment-add-new" href="#"><i class="fa fa-plus" title="{{'PLUGIN_COMMENTS.ADD_NEW'|t}}"></i> {{'PLUGIN_COMMENTS.ADD_NEW'|t}}</a>
2017-10-19 16:53:40 +00:00
<div class="row comments">
{% for comment in grav.twig.comments %}
2017-10-24 00:57:44 +00:00
<div class="comment comment-level-{{comment.level|e}}" data-level="{{comment.level}}" data-id="{{comment.id}}" >
2017-10-19 17:40:02 +00:00
<div class="comment-left">
2017-10-19 16:53:40 +00:00
<a href="#">
2017-10-19 17:40:02 +00:00
<img class="comment-object" src="https://www.gravatar.com/avatar/{{comment.email|trim|lower|md5}}?d=identicon" alt="user icon">
2017-10-19 16:53:40 +00:00
</a>
</div>
2017-10-19 17:40:02 +00:00
<div class="comment-body">
<div class="comment-heading">
<div class="comment-title"><h4>{{comment.title}}</h4></div>
2017-10-24 00:57:44 +00:00
<div class="comment-reply">
<a class="comment-add-reply" href="#"><i class="fa fa-reply" title="{{'PLUGIN_COMMENTS.ADD_REPLY'|t}}"></i> {{'PLUGIN_COMMENTS.ADD_REPLY'|t}}</a>
{% if grav.user.access.admin.super %}
<a class="comment-delete" href="#"><i class="fa fa-trash" title="{{'PLUGIN_COMMENTS.DELETE'|t}}"></i> {{'PLUGIN_COMMENTS.DELETE'|t}}</a>
{% endif %}
</div>
2017-10-19 17:40:02 +00:00
<div class="comment-meta">{{'PLUGIN_COMMENTS.WRITTEN_ON'|t}} {{comment.date|e}} {{'PLUGIN_COMMENTS.BY'|t}} {{comment.author}}</div>
2017-10-19 16:53:40 +00:00
</div>
2017-10-19 17:40:02 +00:00
<div class="comment-text" >
2017-10-19 16:53:40 +00:00
{{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