Files
kfitz.info/_includes/webmention.njk
Kathleen Fitzpatrick 891ed350b9 fix webmentions & css
2024-11-29 11:14:42 -05:00

27 lines
1.2 KiB
Plaintext

<article class="webmention h-cite" id="webmention-{{ webmention['wm-id'] }}">
<div class="webmention__meta">
{% if webmention.author %}
<a class="webmention__author p-author h-card u-url" href="{{ webmention.url }}" target="_blank" rel="noopener noreferrer">
{% if webmention.author.photo %}
<img eleventy:ignore class="webmention__author__photo u-photo" src="{{ webmention.author.photo }}" alt="{{ webmention.author.name }}">
{% else %}
<img eleventy:ignore class="webmention__author__photo" src="{{ '/blog/img/default_avatar.png' | url }}" alt="">
{% endif %}
<strong class="p-name">{{ webmention.author.name }}</strong>
</a>
{% else %}
<span class="webmention__author">
<img class="webmention__author__photo" src="{{ '/blog/img/default_avatar.png' | url }}" alt="">
<strong>Anonymous</strong>
</span>
{% endif %}
{% if webmention.published %}
<time class="webmention__pubdate dt-published" datetime="{{ webmention.published }}">{{ webmention.published | dateFromTimestamp | readableDate("dd LLL yyyy - HH:mm") }}</time>
{% endif %}
</div>
<div class="webmention__content p-content">
{{ webmention.content.text | safe }}
</div>
</article>