mirror of
https://github.com/svemagie/blog-eleventy-indiekit.git
synced 2026-04-02 08:44:56 +02:00
64 lines
2.8 KiB
Plaintext
64 lines
2.8 KiB
Plaintext
{# Reply Context Component #}
|
|
{# Displays rich context for replies, likes, reposts, and bookmarks #}
|
|
{# Uses h-cite microformat for citing external content #}
|
|
|
|
{% if in_reply_to or like_of or repost_of or bookmark_of %}
|
|
<aside class="reply-context p-4 mb-6 bg-surface-100 dark:bg-surface-800 rounded-lg border-l-4 border-primary-500">
|
|
{% if in_reply_to %}
|
|
<div class="u-in-reply-to h-cite">
|
|
<p class="text-sm text-surface-500 dark:text-surface-400 mb-2 flex items-center gap-2">
|
|
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"/>
|
|
</svg>
|
|
<span>In reply to:</span>
|
|
</p>
|
|
<a class="u-url font-medium text-primary-600 dark:text-primary-400 hover:underline break-all" href="{{ in_reply_to }}">
|
|
{{ in_reply_to }}
|
|
</a>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if like_of %}
|
|
<div class="u-like-of h-cite">
|
|
<p class="text-sm text-surface-500 dark:text-surface-400 mb-2 flex items-center gap-2">
|
|
<svg class="w-4 h-4 text-red-500" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true">
|
|
<path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/>
|
|
</svg>
|
|
<span>Liked:</span>
|
|
</p>
|
|
<a class="u-url font-medium text-primary-600 dark:text-primary-400 hover:underline break-all" href="{{ like_of }}">
|
|
{{ like_of }}
|
|
</a>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if repost_of %}
|
|
<div class="u-repost-of h-cite">
|
|
<p class="text-sm text-surface-500 dark:text-surface-400 mb-2 flex items-center gap-2">
|
|
<svg class="w-4 h-4 text-green-500" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"/>
|
|
</svg>
|
|
<span>Reposted:</span>
|
|
</p>
|
|
<a class="u-url font-medium text-primary-600 dark:text-primary-400 hover:underline break-all" href="{{ repost_of }}">
|
|
{{ repost_of }}
|
|
</a>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if bookmark_of %}
|
|
<div class="u-bookmark-of h-cite">
|
|
<p class="text-sm text-surface-500 dark:text-surface-400 mb-2 flex items-center gap-2">
|
|
<svg class="w-4 h-4 text-yellow-500" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true">
|
|
<path d="M17 3H7c-1.1 0-2 .9-2 2v16l7-3 7 3V5c0-1.1-.9-2-2-2z"/>
|
|
</svg>
|
|
<span>Bookmarked:</span>
|
|
</p>
|
|
<a class="u-url font-medium text-primary-600 dark:text-primary-400 hover:underline break-all" href="{{ bookmark_of }}">
|
|
{{ bookmark_of }}
|
|
</a>
|
|
</div>
|
|
{% endif %}
|
|
</aside>
|
|
{% endif %}
|