style: move comment text above actions in mobile_comment.liquid

This commit is contained in:
Kerby Martino (aider) committed 2025-05-02 12:43:10 +08:00
1 parent d303b4cd96
commit 8e33ab8ad8
1 file changed
+22 -9
+22 -9
View File
@@ -11,6 +11,7 @@
{% for comment in top_level_comments %} {% for comment in top_level_comments %}
{% assign direct_replies = site.comments | where: "parent", comment.slug %} {% assign direct_replies = site.comments | where: "parent", comment.slug %}
<div class="border-b border-gray-200 pb-3 mb-3" id="mobile-comment-{{ comment.slug }}"> <div class="border-b border-gray-200 pb-3 mb-3" id="mobile-comment-{{ comment.slug }}">
<p class="text-sm mb-2">{{ comment.content | default: "Missing content" }}</p>
<div class="mt-2 mb-1 text-sm flex flex-col md:flex-row items-start md:items-center md:space-x-2"> <div class="mt-2 mb-1 text-sm flex flex-col md:flex-row items-start md:items-center md:space-x-2">
<div class="flex items-start space-x-2 mb-2 md:mb-0"> <div class="flex items-start space-x-2 mb-2 md:mb-0">
<span class="bg-gray-200 text-gray-700 text-xs font-action px-4 py-2 rounded-full flex items-center"> <span class="bg-gray-200 text-gray-700 text-xs font-action px-4 py-2 rounded-full flex items-center">
@@ -28,15 +29,27 @@
<span class="text-text-muted text-sm opacity-75">{{ comment.date | date: "%d %b %Y" }}</span> <span class="text-text-muted text-sm opacity-75">{{ comment.date | date: "%d %b %Y" }}</span>
</small> </small>
</div> </div>
<p class="text-sm mb-2">{{ comment.content | default: "Missing content" }}</p> <div class="flex items-center justify-between">
<div class="text-right"> <div class="flex items-center space-x-2">
{% if direct_replies.size > 0 %} <span class="bg-gray-200 text-gray-700 text-xs font-action px-4 py-2 rounded-full flex items-center">
<a href="#mobile-comment-thread-{{ comment.slug }}" class="view-replies text-xs text-primary hover:underline" data-comment-slug="{{ comment.slug }}"> <i class="fa-solid fa-arrow-up mr-1"></i> {{ comment.upvotes }}
View Replies ({{ direct_replies.size }}) <i class="fas fa-chevron-right text-xs"></i> </span>
</a> <span class="bg-gray-200 text-gray-700 text-xs font-action px-4 py-2 rounded-full flex items-center">
{% else %} <i class="fas fa-reply mr-1"></i> REPLY
<span class="text-xs text-text-muted opacity-75">No Replies</span> </span>
{% endif %} <span class="bg-gray-200 text-gray-700 text-xs font-action px-4 py-2 rounded-full flex items-center">
<i class="fas fa-comment mr-1"></i> {{ direct_replies.size }}
</span>
</div>
<div class="text-right">
{% if direct_replies.size > 0 %}
<a href="#mobile-comment-thread-{{ comment.slug }}" class="view-replies text-xs text-primary hover:underline" data-comment-slug="{{ comment.slug }}">
View Replies ({{ direct_replies.size }}) <i class="fas fa-chevron-right text-xs"></i>
</a>
{% else %}
<span class="text-xs text-text-muted opacity-75">No Replies</span>
{% endif %}
</div>
</div> </div>
</div> </div>
{% endfor %} {% endfor %}