mirror of
https://github.com/svemagie/indiekit-endpoint-microsub.git
synced 2026-04-02 15:35:00 +02:00
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
15 lines
596 B
Plaintext
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 %}
|