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
+14 -1
+14 -1
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,7 +29,18 @@
<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="flex items-center space-x-2">
<span class="bg-gray-200 text-gray-700 text-xs font-action px-4 py-2 rounded-full flex items-center">
<i class="fa-solid fa-arrow-up mr-1"></i> {{ comment.upvotes }}
</span>
<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-reply mr-1"></i> REPLY
</span>
<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"> <div class="text-right">
{% if direct_replies.size > 0 %} {% 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 }}"> <a href="#mobile-comment-thread-{{ comment.slug }}" class="view-replies text-xs text-primary hover:underline" data-comment-slug="{{ comment.slug }}">
@@ -39,6 +51,7 @@
{% endif %} {% endif %}
</div> </div>
</div> </div>
</div>
{% endfor %} {% endfor %}
{% else %} {% else %}
<p class="text-sm text-text-muted">No comments yet.</p> <p class="text-sm text-text-muted">No comments yet.</p>