fix: webmention avatar errors + placeholder

This commit is contained in:
Cory Dransfeldt 2024-01-06 08:47:10 -08:00
parent a81d209c6a
commit 2b6e9b23c2
No known key found for this signature in database
5 changed files with 20 additions and 3 deletions

View file

@ -6,7 +6,11 @@
<div class="comment__wrapper--interior flex--centered">
<a href={{mention.url}}>
<div class="avatar__wrapper flex--centered">
{% image mention.author.photo, mention.author.name, 'avatar__wrapper-image' %}
<img
src="{{ mention.author.photo }}"
alt="{{ mention.author.name }}"
class="avatar__image"
onerror="this.onerror=null; this.src='/assets/img/icons/user.webp'" />
</div>
</a>
<div class="comment">

View file

@ -11,7 +11,11 @@
{% for mention in mentions[type] %}
<a href={{mention.url}}>
<div class="avatar__wrapper flex--centered">
{% image mention.author.photo, mention.author.name, 'avatar__wrapper-image' %}
<img
src="{{ mention.author.photo }}"
alt="{{ mention.author.name }}"
class="avatar__image"
onerror="this.onerror=null; this.src='/assets/img/icons/user.webp'" />
</div>
</a>
{% endfor %}