feat: modernize upvote design and feed layout in post_list.liquid

This commit is contained in:
Kerby Martino (aider) committed 2025-05-01 03:31:36 +08:00
1 parent 1601bdc0e2
commit cc020dbcd2
1 file changed
+12 -7
+12 -7
View File
@@ -15,13 +15,17 @@
</div> </div>
</div> </div>
<div class="post-list space-y-2"> <div class="post-list space-y-4">
{% for post in site.posts %} {% for post in site.posts %}
<div class="mb-1"> <div class="mb-4">
<article class="flex"> <article class="flex items-start">
<div class="flex items-start mt-1 mr-2"> <div class="flex items-center mr-4">
<span class="text-text-muted text-sm mr-1">{{ forloop.index }}.</span> <button class="upvote-button text-text-muted hover:text-link-hover" aria-label="Upvote">
<a href="#" class="text-text-muted no-underline text-sm hover:text-link-hover" title="Upvote">▲</a> <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 15l7-7 7 7"></path>
</svg>
<span class="ml-1 text-sm">{{ post.upvotes }}</span>
</button>
</div> </div>
<div class="flex-1 text-left"> <div class="flex-1 text-left">
<div> <div>
@@ -34,6 +38,7 @@
</div> </div>
</div> </div>
</article> </article>
<hr class="border-border-light my-4">
</div> </div>
{% endfor %} {% endfor %}
</div> <!-- End post-list --> </div> <!-- End post-list -->
@@ -43,5 +48,5 @@
<div class="flex items-start mr-2" style="width: 24px;"> <div class="flex items-start mr-2" style="width: 24px;">
<!-- This empty div matches the width of the number/upvote area --> <!-- This empty div matches the width of the number/upvote area -->
</div> </div>
<a href="#" class="text-primary hover:underline">More</a> <a href="#" class="text-primary hover:underline bg-primary-dark text-white px-4 py-2">More</a>
</div> </div>