feat: Enhance submit form and post layout with styling and features

This commit is contained in:
Kerby Martino authored and Kerby Martino (aider) committed 2025-05-04 03:26:50 +08:00
1 parent ac0b093c26
commit 636b8241d3
3 files changed
+16 -13

No files matched your search

+1 -1
View File
@@ -18,7 +18,7 @@
'bg-footer': '#f5f5f5', // Footer background
'text-default': '#343a40', // Default text color
'text-muted': '#6c757d', // Muted/secondary text
'text-title': '#212529', // Post title color
'text-title': '#1d0f34', // Post title color
'link-hover': '#32FFA8', // Hover color for upvote arrows
'rules-bg': '#eef6f6', // Rules box background
'border-light': '#dee2e6', // Light borders
+12 -9
View File
@@ -1,21 +1,21 @@
<div class="flex items-center justify-center overflow-hidden">
<div class="w-full max-w-lg mx-auto rounded-lg p-6 bg-bg-footer">
<!-- User Header -->
<div class="mb-6 pb-4 border-b border-gray-200">
<h1 class="text-3xl font-bold text-text-title mb-1">Submit</h1>
<p class="text-sm text-text-muted">
Share something interesting happened
</p>
</div>
<form class="space-y-6">
<div>
<label for="submit_title" class="block text-sm font-medium text-text-muted mb-1">Title</label>
<label for="submit_title" class="block text-sm font-medium text-primary mb-1">Title</label>
<input type="text" id="submit_title" name="title" placeholder="Enter your post title" 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" required>
</div>
<div>
<label for="submit_body" class="block text-sm font-medium text-text-muted mb-1">Body</label>
<label for="submit_body" class="block text-sm font-medium text-primary mb-1">Body</label>
<textarea id="submit_body" name="body" rows="5" placeholder="Enter the post content" 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" required></textarea>
</div>
<div>
<label for="submit_category" class="block text-sm font-medium text-text-muted mb-1">Category</label>
<select id="submit_category" name="category" 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">
<option value="ask">Ask</option>
<option value="show">Show</option>
</select>
</div>
<!-- Optional: Add an error message placeholder if needed -->
<!--
<div class="bg-red-50 border border-red-200 rounded-md p-3 hidden">
@@ -26,5 +26,8 @@
<button type="submit" class="w-full px-6 py-3 bg-primary text-white text-sm font-medium rounded-md hover:bg-primary-dark focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary transition duration-150 ease-in-out font-monda font-action">Submit Post</button>
</div>
</form>
<div class="text-center mt-4">
<p class="text-sm text-text-muted text-center">Bad Login</p>
</div>
</div>
</div>
+3 -3
View File
@@ -17,13 +17,13 @@ layout: default
<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">
<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">
<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">
<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>