feat: Add auto-resizing to comment textareas

This commit is contained in:
Kerby Martino authored and Kerby Martino (aider) committed 2025-05-04 22:30:59 +08:00
1 parent 0e72252d62
commit a88e18c29b
3 files changed
+23 -3

No files matched your search

+8 -1
View File
@@ -44,7 +44,14 @@ layout: default
<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>
<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>
<p class="mt-1 text-xs text-text-muted">Must be at least 8 characters long.</p>
</div>
</div>
<div>