47 lines
1.9 KiB
Twig
47 lines
1.9 KiB
Twig
|
{% extends "layouts" ~ DIR ~ "default.twig" %}
|
||
|
|
||
|
{% block content %}
|
||
|
{% if not post.prev.no_results %}
|
||
|
<div role="navigation" class="prev traversal">
|
||
|
<a rel="prev" href="{{ post.prev.url() }}">{{ "Next post" | translate }}</a>
|
||
|
</div>
|
||
|
{% endif %}
|
||
|
{% include(["feathers" ~ DIR ~ post.feather ~ ".twig", "feathers" ~ DIR ~ "missing.twig"]) %}
|
||
|
{% if not post.next.no_results %}
|
||
|
<div role="navigation" class="next traversal">
|
||
|
<a rel="next" href="{{ post.next.url() }}">{{ "Previous post" | translate }}</a>
|
||
|
</div>
|
||
|
{% endif %}
|
||
|
{% if module_enabled("pingable") and post.pingback_count > 0 %}
|
||
|
<h3 id="pingbacks" class="article_label">{{ "Webmentions" | translate }}</h3>
|
||
|
<article class="discourse" aria-labelledby="pingbacks">
|
||
|
<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) %}
|
||
|
<h3 id="comments" class="article_label">{{ "Comments" | translate }}</h3>
|
||
|
<article class="commentary" aria-labelledby="comments">
|
||
|
<ol class="comments paginated" data-post_id="{{ post.id }}" data-timestamp="{{ post.latest_comment }}">
|
||
|
{% set comments = paginate(post.comments, site.module_comments.comments_per_page, "comments") %}
|
||
|
{% for comment in comments.paginated %}
|
||
|
{% 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>
|
||
|
<div class="comments_pagination traversal">
|
||
|
{{ comments.next_link( ("Newer comments" | translate), null, null, "comments") }}
|
||
|
{{ comments.prev_link( ("Older comments" | translate), null, null, "comments") }}
|
||
|
</div>
|
||
|
{% endif %}
|
||
|
{% endblock %}
|