{% if grav.twig.enable_comments_plugin %}

{{'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 %} {% if config.plugins.login.enabled and grav.user.authenticated %} {% if field.name == 'name' %} {% elseif field.name == 'email' %} {% else %}
{% include "forms/fields/#{field.type}/#{field.type}.html.twig" %}
{% endif %} {% else %}
{% include "forms/fields/#{field.type}/#{field.type}.html.twig" %}
{% endif %} {% endfor %} {% include "forms/fields/formname/formname.html.twig" %}
{% for button in grav.config.plugins.comments.form.buttons %} {% endfor %}
{{ nonce_field('form', 'form-nonce')|raw }}
{{ form.message }}
{% if grav.twig.comments|length %}

{{'PLUGIN_COMMENTS.COMMENTS'|t}}

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