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
+50 -33
+50 -33
View File
@@ -52,60 +52,77 @@
</nav> </nav>
<main class="max-w-screen-lg mx-auto py-4 pb-16 bg-bg-footer"> <main class="max-w-screen-lg mx-auto py-4 pb-16 bg-bg-footer">
<div class="px-4 mt-8"> <div class="px-4 mt-4">
<div class="mb-8"> <form class="space-y-4">
<h2 class="text-lg mb-4 text-primary">Submit a Post</h2> <div class="w-full overflow-x-auto">
<form> <table class="w-full" border="0" cellpadding="0" cellspacing="0">
<div class="mb-4"> <tbody>
<label class="block text-sm font-medium mb-1" for="submit-title">Title:</label> <tr>
<input class="w-full px-3 py-2 border border-gray-300 rounded" type="text" id="submit-title" name="title" required> <td>
</div> <table class="w-full min-w-[300px] table-auto" border="0">
<div class="mb-4"> <tbody>
<label class="block text-sm font-medium mb-1" for="submit-body">Body:</label> <tr>
<textarea class="w-full px-3 py-2 border border-gray-300 rounded" id="submit-body" name="body" required></textarea> <td class="py-2 align-top w-24 sm:w-32 text-primary text-sm font-medium">Title:</td>
</div> <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 class="mb-4"> </tr>
<label class="block text-sm font-medium mb-1" for="submit-category">Category:</label> <tr>
<select class="w-full px-3 py-2 border border-gray-300 rounded" id="submit-category" name="category" required> <td class="py-2 align-top w-24 sm:w-32 text-primary text-sm font-medium">Body:</td>
<option value="ask">Ask</option> <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>
<option value="show">Show</option> </tr>
</select> <tr>
</div> <td class="py-2 align-top w-24 sm:w-32 text-primary text-sm font-medium">Category:</td>
<div class="mb-4"> <td>
<button class="px-4 py-2 bg-primary text-white rounded hover:bg-primary-dark" type="submit">Submit</button> <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">
</div> <option value="ask">Ask</option>
</form> <option value="show">Show</option>
</div> </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> </div>
</main> </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"> <div class="text-center">
<p> <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> </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">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">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">Privacy</a> |
<a href="#" class="text-text-muted mx-2 no-underline hover:underline">DMCA</a> <a href="#" class="text-text-muted mx-2 no-underline hover:underline">DMCA</a>
</div> </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"> <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>
</div> </div>
</footer> </footer>
<!-- Script to toggle mobile menu -->
<script> <script>
document.addEventListener('DOMContentLoaded', () => { document.addEventListener('DOMContentLoaded', () => {
const menuButton = document.getElementById('menuButton'); const menuButton = document.getElementById('menuButton');
const mobileMenu = document.getElementById('mobileMenu'); const mobileMenu = document.getElementById('mobileMenu');
menuButton.addEventListener('click', () => { if (menuButton && mobileMenu) {
mobileMenu.classList.toggle('hidden'); menuButton.addEventListener('click', () => {
const expanded = menuButton.getAttribute('aria-expanded') === 'true'; mobileMenu.classList.toggle('hidden');
menuButton.setAttribute('aria-expanded', !expanded); const expanded = menuButton.getAttribute('aria-expanded') === 'true';
}); menuButton.setAttribute('aria-expanded', !expanded);
});
}
}); });
</script> </script>
</body> </body>