chore: return null and skip rendering webmentions container + extra border if there are no mentions

This commit is contained in:
Cory Dransfeldt 2024-01-01 16:49:17 -08:00
parent 12b42dc05d
commit ccd2fbf058
No known key found for this signature in database
4 changed files with 15 additions and 5 deletions

View file

@ -1,9 +1,9 @@
{% if webmentions %}
{% assign mentions = webmentions.mentions | webmentionsByUrl: page.url %}
{% if mentions %}
<div class="webmentions__wrapper">
{% assign mentions = webmentions.mentions | webmentionsByUrl: page.url %}
{% render "partials/webmentions/interaction.liquid", mentions: mentions, type: 'repost-of' %}
{% render "partials/webmentions/interaction.liquid", mentions: mentions, type: 'like-of' %}
{% render "partials/webmentions/comments.liquid", mentions: mentions %}
{% render "partials/webmentions/links.liquid", mentions: mentions %}
</div>
{% endif %}
{% endif %}