Files
indiekit-endpoint-microsub/views/layouts/reader.njk
Ricardo 1512bcecb2 feat: add CSS stacking avatar fallback to all templates (v1.0.49)
Phase 3 frontend harmonization: apply the same avatar fallback pattern
used in ActivityPub to all Microsub templates. A fallback initials span
is always rendered; when the <img> loads, it covers the fallback via
absolute positioning. Broken images are removed by event delegation,
revealing the initials underneath.

Templates updated: item-card, item, actor, author (3 avatar sizes:
40px card, 48px detail, 80px profile). Error delegation script added
to reader layout.

Confab-Link: http://localhost:8080/sessions/bb4a6ec4-b711-48cd-b3d7-942ec2a9851d
2026-03-13 13:53:45 +01:00

15 lines
596 B
Plaintext

{#
Microsub Reader Layout
Extends document.njk and adds reader-specific stylesheet
#}
{% extends "document.njk" %}
{% block content %}
<link rel="stylesheet" href="/assets/@rmdes-indiekit-endpoint-microsub/styles.css">
{% include "partials/breadcrumbs.njk" %}
{% include "partials/view-switcher.njk" %}
{% block reader %}{% endblock %}
{# Avatar fallback — remove broken images to reveal initials fallback underneath #}
<script>document.addEventListener("error",function(e){var t=e.target;if(t.tagName==="IMG"&&t.closest("[data-avatar-fallback]"))t.remove()},true)</script>
{% endblock %}