82 lines
5.0 KiB
Plaintext
82 lines
5.0 KiB
Plaintext
<h3 class="mt-4 text-lg font-medium">Comments</h3>
|
|
|
|
<div class="mt-4">
|
|
<!-- Nested Comment -->
|
|
<div id="mobile-comment-thread-view" class="mt-4 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 id="mobile-comment-thread-content">
|
|
<div class="border-b border-gray-200 pb-3 mb-3">
|
|
<p class="text-sm">{{ page.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="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.replies }}
|
|
</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 class="ml-4 mt-3 border-l-2 border-gray-200 pl-2">
|
|
|
|
{% assign nested_comments = site.comments | where: "parent", page.slug | sort: "date" %}
|
|
|
|
{% for comment in nested_comments %}
|
|
<div class="mb-3 pb-3 border-b border-gray-200">
|
|
<p class="text-sm">{{ comment.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="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>
|
|
</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> {{ comment.replies }}
|
|
</span>
|
|
</div>
|
|
<small class="text-sm font-action">
|
|
<a href="#" class="text-sm hover:underline">{{ comment.author }}</a>
|
|
<span class="text-text-muted text-sm opacity-75">{{ comment.date | date: "%d %b %Y" }}</span>
|
|
</small>
|
|
</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 resize-none overflow-hidden"
|
|
id="comment-body"
|
|
name="body"
|
|
placeholder="Enter your comment"
|
|
oninput="this.style.height = 'auto'; this.style.height = this.scrollHeight + 'px';"
|
|
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>
|
|
{% endfor %}
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|