fix webmentions & css
This commit is contained in:
22
_includes/webmentions.njk
Normal file
22
_includes/webmentions.njk
Normal file
@@ -0,0 +1,22 @@
|
||||
{%- 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>
|
||||
Reference in New Issue
Block a user