feat: Add reply form to mobile comment nested

This commit is contained in:
Kerby Martino authored and Kerby Martino (aider) committed 2025-05-04 22:16:25 +08:00
1 parent 7bdc012868
commit 0e72252d62
4 files changed
+15 -64

No files matched your search

+14
View File
@@ -51,6 +51,20 @@
<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>
<!-- Reply Box -->
<form>
<div class="mb-4">
<div>
<textarea class="w-full text-primary text-sm px-3 py-2 bg-transparent border-b-2 border-gray-300 focus:outline-none focus:border-primary transition duration-150 ease-in-out placeholder:text-xs" id="comment-body" name="body" placeholder="Enter your comment" required></textarea>
</div>
<p class="mt-1 text-xs text-text-muted">Must be at least 8 characters long.</p>
</div>
<div>
<button class="px-4 py-2 bg-primary text-white rounded hover:bg-primary-dark" type="submit">Reply</button>
</div>
</form>
</div> </div>
{% endfor %} {% endfor %}
+1 -1
View File
@@ -62,7 +62,7 @@
<i class="fa-solid fa-arrow-up mr-1"></i> {{ post.upvotes }} <i class="fa-solid fa-arrow-up mr-1"></i> {{ post.upvotes }}
</span> </span>
<span class="bg-gray-200 text-gray-700 text-xs font-action px-4 py-2 rounded-full flex items-center cursor-pointer hover:bg-link-hover"> <span class="bg-gray-200 text-gray-700 text-xs font-action px-4 py-2 rounded-full flex items-center cursor-pointer hover:bg-link-hover">
<i class="fas fa-reply mr-1"></i> REPLY <a href="/reply/"><i class="fas fa-reply mr-1"></i> REPLY</a>
</span> </span>
<span class="bg-gray-200 text-gray-700 text-xs font-action px-4 py-2 rounded-full flex items-center cursor-pointer hover:bg-link-hover"> <span class="bg-gray-200 text-gray-700 text-xs font-action px-4 py-2 rounded-full flex items-center cursor-pointer hover:bg-link-hover">
<i class="fas fa-comment mr-1"></i> {{ post.comments_count }} <i class="fas fa-comment mr-1"></i> {{ post.comments_count }}
-53
View File
@@ -1,53 +0,0 @@
---
layout: default
---
<article class="flex">
<div class="mr-2">
<a href="#" class="text-text-muted no-underline text-sm leading-none inline-block pt-0.5 hover:text-link-hover" title="Back"><i class="fas fa-arrow-left"></i></a>
</div>
<div class="flex-1 text-left">
<div>
<p class="mt-0 mb-1">
<strong><a href="#" class="text-text-title font-bold text-base hover:underline">{{ page.title }}</a></strong>
</p>
<div class="post-content mb-2">
{{ content }}
</div>
<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">
<span class="bg-gray-200 text-gray-700 text-xs font-action px-4 py-2 rounded-full flex items-center cursor-pointer hover:bg-link-hover">
<i class="fa-solid fa-arrow-up mr-1"></i> {{ page.upvotes }}
</span>
<span class="bg-gray-200 text-gray-700 text-xs font-action px-4 py-2 rounded-full flex items-center cursor-pointer hover:bg-link-hover">
<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 cursor-pointer hover:bg-link-hover">
<i class="fas fa-comment mr-1"></i> {{ page.comments_count }}
</span>
</div>
<small class="text-sm font-action">
<a href="#" class="text-sm hover:underline">{{ page.author }}</a>
<span class="text-text-muted text-sm opacity-75">{{ page.date | date: "%d %b %Y" }}</span>
</small>
</div>
</div>
</div>
</article>
<div class="mt-8">
<form>
<div class="mb-4">
<label class="block font-medium text-sm mb-1" for="comment-body">Comment:</label>
<div>
<textarea class="w-full text-primary text-sm px-3 py-2 bg-transparent border-b-2 border-gray-300 focus:outline-none focus:border-primary transition duration-150 ease-in-out placeholder:text-xs" id="comment-body" name="body" placeholder="Enter your comment" required></textarea>
</div>
</div>
<div>
<button class="px-4 py-2 bg-primary text-white rounded hover:bg-primary-dark" type="submit">Add Comment</button>
</div>
</form>
{% include mobile_comment_top.liquid %}
</div>
-10
View File
@@ -1,10 +0,0 @@
---
layout: reply
title: Submit Reply
post_title: "[Ask] The saga of the disappearing ergonomic chair continues."
post_author: deskdetective
post_date: 2023-10-02 10:00:00 +0000
permalink: /reply/
---
Every time I leave my desk, it seems to vanish. Suspecting foul play at this point. Anyone else faced something like this?