{# ------------------------------------------------------------------ #} {# Comments thread partial. #} {# Rendered INTO the post detail page (NOT a full page, no extends). #} {# Context: `post`, `comments` (approved, oldest first), #} {# `cfg` (get_config("comments") -> auto_approve), #} {# `post_is_public` (the post feature's own public check). #} {# ------------------------------------------------------------------ #}

{{ _('Comments') }} ({{ comments|length }})

{# Flash messages #} {% with messages = get_flashed_messages(with_categories=true) %} {% if messages %}
{% for category, message in messages %}
{{ message }}
{% endfor %}
{% endif %} {% endwith %} {# Comment list #} {# The form shows only where the comment route takes one, on a post #} {# the public can read whose comments are open. The preview of a #} {# draft or of a scheduled post says where the form will be instead. #} {% if post.comment_status != 'closed' and not post_is_public %}

{{ _('Visitors can comment here once the post is public.') }}

{% elif post.comment_status != 'closed' %}
{# Captcha widget (cloudflare / recaptcha), empty when none installed #} {% if captcha_widget is defined %} {{ captcha_script() }} {{ captcha_widget() }} {% endif %} {% if not (cfg is defined and cfg.auto_approve) %}

{{ _('Comments are moderated before appearing.') }}

{% endif %}
{% endif %}