chore: return null and skip rendering webmentions container + extra border if there are no mentions
This commit is contained in:
parent
12b42dc05d
commit
ccd2fbf058
4 changed files with 15 additions and 5 deletions
|
@ -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 %}
|
|
@ -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);
|
||||
}
|
||||
|
|
Reference in a new issue