diff --git a/assets/comments.js b/assets/comments.js index c366189..11d6225 100644 --- a/assets/comments.js +++ b/assets/comments.js @@ -154,7 +154,7 @@ jQuery(document).ready(function () { if ($( "div[data-id='" + response.data.parent_id + "']" ).length > 0) { $( "div[data-id='" + response.data.parent_id + "']" ).first().after(newMedia); } else { - $( "div.comments" ).last().prepend(newMedia); + $( "#comments" ).prepend(newMedia); } } setTimeout(function () { diff --git a/templates/partials/comments.html.twig b/templates/partials/comments.html.twig index 9728aa0..a39d91f 100644 --- a/templates/partials/comments.html.twig +++ b/templates/partials/comments.html.twig @@ -2,14 +2,12 @@ {% set scope = scope ?: 'data.' %}

{{'PLUGIN_COMMENTS.COMMENTS'|t}}

- - - {% include 'partials/comments.form.html.twig' %} - - {% if grav.twig.comments|length %} - {{'PLUGIN_COMMENTS.ADD_NEW'|t}} -
+ + {% include 'partials/comments.form.html.twig' %} + +
+ {% if grav.twig.comments|length %} {% for comment in grav.twig.comments %}
@@ -33,10 +31,7 @@
{% endfor %} -
- - {% endif %} + {% endif %} +
{% endif %} - - diff --git a/templates/partials/recentcomments.html.twig b/templates/partials/recentcomments.html.twig index d8084e3..296535d 100644 --- a/templates/partials/recentcomments.html.twig +++ b/templates/partials/recentcomments.html.twig @@ -1,6 +1,6 @@ {# you may set options when using this partial. Example: include 'partials/recentcomments.html.twig' with {'limit': 5, 'pages_limit': 3} #} {% if grav.twig.enable_comments_plugin %} -

{'PLUGIN_COMMENTS.COMMENTS_STATS'|t}}

+

{{'PLUGIN_COMMENTS.COMMENTS_STATS'|t}}

{% set stats = recent_comments(limit|default(5), pages_limit|default(3)) %} {% if stats.global_stats.active_entries %} {{stats.global_stats.active_entries}} @@ -13,7 +13,7 @@ {% endif %} {% for key, entry in stats.pages %} {% if loop.first %} -

{'PLUGIN_COMMENTS.RECENT_PAGES'|t}} (limit {{stats.options.pages_limit}})

+

{{'PLUGIN_COMMENTS.RECENT_PAGES'|t}} (limit {{stats.options.pages_limit}})