refactor: Modernize submit.liquid layout with Tailwind CSS styling
This commit is contained in:
1 parent
997d3df6c6
commit
aa084d4b07
1 file changed
+26
-33
+26
-33
@@ -1,37 +1,30 @@
|
|||||||
<form class="space-y-4">
|
<div class="flex items-center justify-center overflow-hidden">
|
||||||
<div class="w-full overflow-x-auto">
|
<div class="w-full max-w-md mx-auto rounded-lg p-6 bg-bg-footer">
|
||||||
<table class="w-full" border="0" cellpadding="0" cellspacing="0">
|
<form class="space-y-6">
|
||||||
<tbody>
|
<div>
|
||||||
<tr>
|
<label for="submit_title" class="block text-sm font-medium text-text-muted mb-1">Title</label>
|
||||||
<td>
|
<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>
|
||||||
<table class="w-full min-w-[300px] table-auto" border="0">
|
</div>
|
||||||
<tbody>
|
<div>
|
||||||
<tr>
|
<label for="submit_body" class="block text-sm font-medium text-text-muted mb-1">Body</label>
|
||||||
<td class="py-2 align-top w-24 sm:w-32 text-primary text-sm font-medium">Title:</td>
|
<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>
|
||||||
<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>
|
</div>
|
||||||
</tr>
|
<div>
|
||||||
<tr>
|
<label for="submit_category" class="block text-sm font-medium text-text-muted mb-1">Category</label>
|
||||||
<td class="py-2 align-top w-24 sm:w-32 text-primary text-sm font-medium">Body:</td>
|
<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">
|
||||||
<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="ask">Ask</option>
|
||||||
<option value="show">Show</option>
|
<option value="show">Show</option>
|
||||||
</select>
|
</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>
|
</div>
|
||||||
</form>
|
<!-- 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>
|
||||||
Reference in new issue
Block a user