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
21 lines
687 B
Plaintext
21 lines
687 B
Plaintext
{# Author display #}
|
|
{% if author %}
|
|
<div class="author">
|
|
<div class="ms-item__avatar-wrap" data-avatar-fallback>
|
|
{% if author.photo %}
|
|
<img src="{{ author.photo }}" alt="" class="author__photo" width="48" height="48" loading="lazy">
|
|
{% endif %}
|
|
<span class="ms-item__author-photo ms-item__author-photo--default" aria-hidden="true">{{ author.name[0] | upper if author.name else "?" }}</span>
|
|
</div>
|
|
<div class="author__info">
|
|
<span class="author__name">
|
|
{% if author.url %}
|
|
<a href="{{ author.url }}">{{ author.name or author.url }}</a>
|
|
{% else %}
|
|
{{ author.name or "Unknown" }}
|
|
{% endif %}
|
|
</span>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|