{% if grav.twig.enable %}

{{'PLUGIN_COMMENTS.ADD_COMMENT'|t}}

{% for field in grav.config.plugins.comments.form.fields %} {% set value = form.value(field.name) %} {% if field.evaluateDefault %} {% set value = evaluate(field.evaluateDefault) %} {% endif %}
{% include "forms/fields/#{field.type}/#{field.type}.html.twig" %}
{% endfor %}
{% for button in grav.config.plugins.comments.form.buttons %} {% endfor %}
{{ nonce_field('form', 'form-nonce') }}
{{ form.message }}
{% if grav.twig.comments|length %}

{{'PLUGIN_COMMENTS.COMMENTS'|t}}

{% for comment in grav.twig.comments|array_reverse %} {% endfor %}
{{comment.text|e}}
{{'PLUGIN_COMMENTS.WRITTEN_ON'|t}} {{comment.date|e}} {{'PLUGIN_COMMENTS.BY'|t}} {{comment.author|e}}
{% endif %} {% endif %}