Files
indiekit-endpoint-activitypub/views/activitypub-post-detail.njk
Ricardo 0cf49e037c fix: remove duplicate page headings across all AP templates
document.njk already renders title as h1 via the heading macro.
All 14 AP templates were also calling heading() with level 1 inside
their content block, producing two h1 elements per page. Removed
the redundant calls and moved dynamic count prefixes into the title
variable in followers/following controllers.
2026-02-21 21:32:56 +01:00

56 lines
2.0 KiB
Plaintext

{% extends "layouts/ap-reader.njk" %}
{% from "heading/macro.njk" import heading with context %}
{% block readercontent %}
<div class="ap-post-detail" data-mount-path="{{ mountPath }}">
{# Back button #}
<div class="ap-post-detail__back">
<a href="{{ mountPath }}/admin/reader" class="ap-post-detail__back-link">
← {{ __("activitypub.reader.post.back") }}
</a>
</div>
{% if notFound %}
{# Post not found — show message with external link #}
<div class="ap-post-detail__not-found">
<p>{{ __("activitypub.reader.post.notFound") }}</p>
{% if objectUrl %}
<p><a href="{{ objectUrl }}" target="_blank" rel="noopener noreferrer">{{ __("activitypub.reader.post.openExternal") }} →</a></p>
{% endif %}
</div>
{% else %}
{# Parent posts (thread context above main post) #}
{% if parentPosts and parentPosts.length > 0 %}
<div class="ap-post-detail__parents">
<h2 class="ap-post-detail__section-title">{{ __("activitypub.reader.post.parentPosts") }}</h2>
{% for parentItem in parentPosts %}
{% set item = parentItem %}
<div class="ap-post-detail__parent-item">
{% include "partials/ap-item-card.njk" %}
</div>
{% endfor %}
</div>
{% endif %}
{# Main post #}
<div class="ap-post-detail__main">
{% include "partials/ap-item-card.njk" %}
</div>
{# Replies (below main post) #}
{% if replyPosts and replyPosts.length > 0 %}
<div class="ap-post-detail__replies">
<h2 class="ap-post-detail__section-title">{{ __("activitypub.reader.post.replies") }}</h2>
{% for replyItem in replyPosts %}
{% set item = replyItem %}
<div class="ap-post-detail__reply-item">
{% include "partials/ap-item-card.njk" %}
</div>
{% endfor %}
</div>
{% endif %}
{% endif %}
</div>
{% endblock %}