refactor: move upvote button and count to inline span

This commit is contained in:
Kerby Martino authored and Kerby Martino (aider) committed 2025-05-01 11:08:18 +08:00
1 parent fe261ec597
commit a574dc2f00
1 file changed
+4 -7
+4 -7
View File
@@ -19,12 +19,6 @@
{% for post in site.posts %}
<div class="mb-4">
<article class="flex items-start">
<div class="flex flex-col items-center mr-4">
<button class="upvote-button text-text-muted hover:text-link-hover" aria-label="Upvote">
<i class="fa-solid fa-arrow-up"></i>
</button>
<span class="text-sm mt-1">{{ post.upvotes }}</span>
</div>
<div class="flex-1 text-left">
<div>
<p class="mt-0 mb-0.5">
@@ -32,11 +26,14 @@
</p>
<div class="mt-2 mb-1 text-sm flex items-center space-x-2">
<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> {{ post.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> {{ post.comments_count }} COMMENTS
<i class="fas fa-comment mr-1"></i> {{ post.comments_count }}
</span>
</div>
<small class="text-sm font-action"><a href="#" class="text-sm hover:underline">{{ post.author }}</a> <span class="text-text-muted text-sm opacity-75">{{ post.date | date: "%d %b %Y" }}</span></small>