{# Received webmentions as microformats2 responses (v2.8.0)
Each response is an h-cite in a property of the note's h-entry:
u-comment (replies), u-like, u-repost, u-bookmark, u-mention.
See https://indieweb.org/comments-presentation and microformats.org/wiki/h-entry #}
{# When the source said when it was posted, use that; else when we received it #}
{% macro response_time(wm, fmt='%B %-d, %Y') %}
{% set when = wm.source_published or wm.received_at %}
{%- endmacro %}
{# The response's own URL: the source's u-url if it gave one #}
{% macro response_url(wm) %}{{ wm.source_post_url or wm.source_url }}{% endmacro %}
{# Where a backfed response came from, e.g. "via Bluesky" (v2.13.0) #}
{% macro via(wm) %}{% if wm.via %}via {{ wm.via }}{% endif %}{% endmacro %}
{# Author h-card: name, URL and photo. u-url is on an inner link: on the
h-card element itself it would belong to the enclosing h-cite.
The photo is this site's saved copy (v2.13.0); until there is one, the
initial is shown instead of loading it from the other site. #}
{% macro author_card(wm, class='', photo_size=48, show_name=True) %}
{% set photo = wm.author_photo|local_avatar %}
{%- endmacro %}
{# A reply, shown as a comment #}
{% macro reply(wm) %}
{{ wm.content_snippet|striptags|truncate(200) }}
{% endif %} {{ response_time(wm) }} {{ via(wm) }}