mirror of
https://github.com/svemagie/indiekit-endpoint-activitypub.git
synced 2026-04-02 15:44:58 +02:00
- Return multiple navigation items (ActivityPub, Reader, Notifications, Moderation)
so all AP sub-pages are accessible from the sidebar
- Fix Alpine.js not loading: `{% block head %}` was silently discarded because
the parent template chain has no such block — moved script/css into content block
- Pin Alpine.js to exact version 3.14.9 to prevent CDN resolution issues
- Add fallback avatar (first letter) when author photo is missing
- Guard empty author URLs to prevent broken links
- Fix Temporal.Instant TypeError: use String() instead of new Date() for
Fedify published timestamps in inbox-listeners and timeline-store
- Link author names to remote profile view instead of raw AP URLs
- Bump to 1.1.3
62 lines
2.1 KiB
Plaintext
62 lines
2.1 KiB
Plaintext
{% extends "layouts/reader.njk" %}
|
|
|
|
{% from "heading/macro.njk" import heading with context %}
|
|
{% from "prose/macro.njk" import prose with context %}
|
|
|
|
{% block readercontent %}
|
|
{{ heading({
|
|
text: __("activitypub.reader.title"),
|
|
level: 1,
|
|
parent: { text: __("activitypub.title"), href: mountPath }
|
|
}) }}
|
|
|
|
{# Tab navigation #}
|
|
<nav class="ap-tabs" role="tablist">
|
|
<a href="?tab=all" class="ap-tab{% if tab == 'all' %} ap-tab--active{% endif %}" role="tab">
|
|
{{ __("activitypub.reader.tabs.all") }}
|
|
</a>
|
|
<a href="?tab=notes" class="ap-tab{% if tab == 'notes' %} ap-tab--active{% endif %}" role="tab">
|
|
{{ __("activitypub.reader.tabs.notes") }}
|
|
</a>
|
|
<a href="?tab=articles" class="ap-tab{% if tab == 'articles' %} ap-tab--active{% endif %}" role="tab">
|
|
{{ __("activitypub.reader.tabs.articles") }}
|
|
</a>
|
|
<a href="?tab=replies" class="ap-tab{% if tab == 'replies' %} ap-tab--active{% endif %}" role="tab">
|
|
{{ __("activitypub.reader.tabs.replies") }}
|
|
</a>
|
|
<a href="?tab=boosts" class="ap-tab{% if tab == 'boosts' %} ap-tab--active{% endif %}" role="tab">
|
|
{{ __("activitypub.reader.tabs.boosts") }}
|
|
</a>
|
|
<a href="?tab=media" class="ap-tab{% if tab == 'media' %} ap-tab--active{% endif %}" role="tab">
|
|
{{ __("activitypub.reader.tabs.media") }}
|
|
</a>
|
|
</nav>
|
|
|
|
{# Timeline items #}
|
|
{% if items.length > 0 %}
|
|
<div class="ap-timeline">
|
|
{% for item in items %}
|
|
{% include "partials/ap-item-card.njk" %}
|
|
{% endfor %}
|
|
</div>
|
|
|
|
{# Pagination #}
|
|
{% if before or after %}
|
|
<nav class="ap-pagination">
|
|
{% if after %}
|
|
<a href="?tab={{ tab }}&after={{ after }}" class="ap-pagination__prev">
|
|
{{ __("activitypub.reader.pagination.newer") }}
|
|
</a>
|
|
{% endif %}
|
|
{% if before %}
|
|
<a href="?tab={{ tab }}&before={{ before }}" class="ap-pagination__next">
|
|
{{ __("activitypub.reader.pagination.older") }}
|
|
</a>
|
|
{% endif %}
|
|
</nav>
|
|
{% endif %}
|
|
{% else %}
|
|
{{ prose({ text: __("activitypub.reader.empty") }) }}
|
|
{% endif %}
|
|
{% endblock %}
|