leilukin-tumbleblog/themes/umbra/pages/view.twig

32 lines
1.1 KiB
Twig
Raw Permalink Normal View History

2024-06-20 14:10:42 +00:00
{% extends "layouts" ~ DIR ~ "default.twig" %}
{% block content %}
{% include(["feathers" ~ DIR ~ post.feather ~ ".twig", "feathers" ~ DIR ~ "missing.twig"]) %}
{% if module_enabled("pingable") and post.pingback_count > 0 %}
<article class="discourse">
<h3 id="pingbacks">{{ "Webmentions" | translate }}</h3>
<ol class="pingbacks">
{% for pingback in post.pingbacks %}
<li><a id="pingback_{{ pingback.id }}" href="{{ pingback.source | fix(true) }}">{{ pingback.title | oneof("[Untitled]" | translate) }}</a></li>
{% endfor %}
</ol>
</article>
{% endif %}
{% if module_enabled("comments") and (post.comment_count > 0 or post.commentable) %}
<article class="commentary">
<h3 id="comments">{{ "Comments" | translate }}</h3>
<ol class="comments" data-post_id="{{ post.id }}" data-timestamp="{{ post.latest_comment }}">
{% for comment in post.comments %}
{% include "content" ~ DIR ~ "comment.twig" %}
{% endfor %}
<li id="comment_shim"></li>{# Needed for AJAX commenting. #}
{% if post.commentable %}
<li class="comment_form">
{% include "forms" ~ DIR ~ "comment" ~ DIR ~ "new.twig" %}
</li>
{% endif %}
</ol>
</article>
{% endif %}
{% endblock %}