style: apply consistent layout to submit.html

This commit is contained in:
Your Name (aider) committed 2025-04-28 11:07:21 +00:00
1 parent 106451054e
commit 002dabf086
1 file changed
+40 -23
+40 -23
View File
@@ -52,60 +52,77 @@
</nav>
<main class="max-w-screen-lg mx-auto py-4 pb-16 bg-bg-footer">
<div class="px-4 mt-8">
<div class="mb-8">
<h2 class="text-lg mb-4 text-primary">Submit a Post</h2>
<form>
<div class="mb-4">
<label class="block text-sm font-medium mb-1" for="submit-title">Title:</label>
<input class="w-full px-3 py-2 border border-gray-300 rounded" type="text" id="submit-title" name="title" required>
</div>
<div class="mb-4">
<label class="block text-sm font-medium mb-1" for="submit-body">Body:</label>
<textarea class="w-full px-3 py-2 border border-gray-300 rounded" id="submit-body" name="body" required></textarea>
</div>
<div class="mb-4">
<label class="block text-sm font-medium mb-1" for="submit-category">Category:</label>
<select class="w-full px-3 py-2 border border-gray-300 rounded" id="submit-category" name="category" required>
<div class="px-4 mt-4">
<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>
</div>
<div class="mb-4">
<button class="px-4 py-2 bg-primary text-white rounded hover:bg-primary-dark" type="submit">Submit</button>
</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>
</div>
</main>
<footer class="max-w-screen-lg mx-auto bg-bg-footer py-8 px-6 text-text-muted">
<footer class="max-w-screen-lg mx-auto bg-bg-footer py-6 px-6 text-text-muted border-t border-navbar-border">
<div class="text-center">
<p>
Seen something today? Don’t let it go to waste. <a href="#" class="text-primary hover:underline">Submit it</a>.
Seen something today? Don't let it go to waste. <a href="#" class="text-primary hover:underline">Submit it</a>.
</p>
<div class="mt-4 text-sm">
<div class="mt-3 text-sm">
<a href="#" class="text-text-muted mx-2 no-underline hover:underline">Guidelines</a> |
<a href="#" class="text-text-muted mx-2 no-underline hover:underline">Tips</a> |
<a href="#" class="text-text-muted mx-2 no-underline hover:underline">Privacy</a> |
<a href="#" class="text-text-muted mx-2 no-underline hover:underline">DMCA</a>
</div>
<div class="mt-4 text-center">
<div class="mt-3 text-center">
<input type="text" placeholder="Search..." class="px-3 py-2 border border-gray-300 rounded w-48 bg-bg-light text-text-default focus:outline-none focus:ring-1 focus:ring-primary">
</div>
</div>
</footer>
<!-- Script to toggle mobile menu -->
<script>
document.addEventListener('DOMContentLoaded', () => {
const menuButton = document.getElementById('menuButton');
const mobileMenu = document.getElementById('mobileMenu');
if (menuButton && mobileMenu) {
menuButton.addEventListener('click', () => {
mobileMenu.classList.toggle('hidden');
const expanded = menuButton.getAttribute('aria-expanded') === 'true';
menuButton.setAttribute('aria-expanded', !expanded);
});
}
});
</script>
</body>