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 %}

View file

@ -705,6 +705,7 @@ article .now__section--header {
.webmentions__wrapper {
border-top: 1px solid var(--gray-200);
margin-top: 1.5rem;
margin-bottom: 3.25rem;
padding-top: 2rem;
}
@ -783,7 +784,7 @@ article .now__section--header {
}
.author__wrapper {
margin-top: 3rem;
margin-top: 1.5rem;
padding: 3rem 0 1rem;
border-top: 1px solid var(--gray-200);
}