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

23 lines
610 B
Plaintext

{%- set absoluteUrl -%}{{ page.url | url | absoluteUrl(metadata.url) }}{%- endset -%}
{%- set mentions = webmentions.children | mentionsForUrl(absoluteUrl) -%}
<div class="webmentions" id="webmentions">
<h3>Webmentions</h3>
{% if mentions | length %}
<h4>{{ mentions.length }} {% if mentions.length == "1" %}Reply{% else %}Replies{% endif %}</h4>
<ol class="webmentions__list">
{% for webmention in mentions | reverse %}
<li class="webmentions__item">
{% include 'webmention.njk' %}
</li>
{% endfor %}
</ol>
{% else %}
<p>No replies yet.</p>
{% endif %}
{% include 'likes.njk' %}
</div>