chore: dry up webmentions

This commit is contained in:
Cory Dransfeldt 2023-08-14 09:50:29 -07:00
parent 561bf48c74
commit f3faf8feab
No known key found for this signature in database
10 changed files with 70 additions and 71 deletions

View file

@ -0,0 +1,21 @@
{%- capture title %}
{% if type == 'repost-of' %}
Reposts
{% elsif type == 'like-of' %}
Likes
{% endif %}
{% endcapture -%}
{% if mentions[type].size > 0 %}
<h2 class="text-lg md:text-xl font-black leading-tight dark:text-gray-200">{{ title }}</h2>
<div class="flex flex-row items-center mt-4 mb-6">
<ul class="ml-3 flex flex-row flex-wrap">
{% for mention in mentions[type] %}
<li class="-ml-3 inline">
<a href={{mention.url}}>
{% image mention.author.photo, mention.author.name, 'bg-gray-900 dark:bg-white h-14 w-14 rounded-full border-4 border-white dark:border-gray-900 transition-all hover:border-pink-500 dark:hover:border-pink-500', '56px' %}
</a>
</li>
{% endfor %}
</ul>
</div>
{% endif %}