refactor: Modernize submit.liquid layout with Tailwind CSS styling

This commit is contained in:
Kerby Martino (aider) committed 2025-05-03 18:14:17 +08:00
1 parent 997d3df6c6
commit aa084d4b07
1 file changed
+30 -37
+30 -37
View File
@@ -1,37 +1,30 @@
<form class="space-y-4">
<div class="w-full overflow-x-auto">
<table class="w-full" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td>
<table class="w-full min-w-[300px] table-auto" border="0">
<tbody>
<tr>
<td class="py-2 align-top w-24 sm:w-32 text-primary text-sm font-medium">Title:</td>
<td><input type="text" name="title" class="w-full max-w-full sm:w-[350px] md:w-[450px] text-primary text-sm px-3 py-1 border border-gray-300 rounded"></td>
</tr>
<tr>
<td class="py-2 align-top w-24 sm:w-32 text-primary text-sm font-medium">Body:</td>
<td><textarea name="body" rows="5" class="w-full max-w-full sm:w-[350px] md:w-[450px] text-primary text-sm px-3 py-1 border border-gray-300 rounded"></textarea></td>
</tr>
<tr>
<td class="py-2 align-top w-24 sm:w-32 text-primary text-sm font-medium">Category:</td>
<td>
<select name="category" class="w-full max-w-full sm:w-[350px] md:w-[450px] text-primary text-sm px-3 py-1 border border-gray-300 rounded">
<option value="ask">Ask</option>
<option value="show">Show</option>
</select>
</td>
</tr>
<tr>
<td class="py-2 w-24 sm:w-32"></td>
<td><button type="submit" class="px-2 py-1 bg-primary text-white rounded hover:bg-primary-dark">Submit</button></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</form>
<div class="flex items-center justify-center overflow-hidden">
<div class="w-full max-w-md mx-auto rounded-lg p-6 bg-bg-footer">
<form class="space-y-6">
<div>
<label for="submit_title" class="block text-sm font-medium text-text-muted mb-1">Title</label>
<input type="text" id="submit_title" name="title" placeholder="Enter your post title" class="w-full text-primary text-base 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>
<textarea id="submit_body" name="body" rows="5" placeholder="Enter the post content" class="w-full text-primary text-base 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-base 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">
<p class="text-sm text-red-500 text-center">Submission Error</p>
</div>
-->
<div class="pt-2">
<button type="submit" class="w-full px-6 py-3 bg-primary text-white text-base 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>
</div>