Similar navbar code applied to all existing pages
This commit is contained in:
1 parent
fcdaca9e8b
commit
1a4ae3a460
6 files changed
+381
-383
No files matched your search
+84
-82
@@ -7,97 +7,99 @@
|
||||
<link href="/src/styles.css" rel="stylesheet">
|
||||
</head>
|
||||
<body class="font-sans text-text-default pt-navbar-height">
|
||||
<nav class="fixed top-0 left-0 right-0 bg-navbar-bg border-b border-navbar-border z-10" role="navigation" aria-label="main navigation">
|
||||
<div class="max-w-screen-lg mx-auto px-4">
|
||||
<div class="flex justify-between">
|
||||
<div class="flex">
|
||||
<a class="py-4 px-3 font-bold text-primary" href="/">
|
||||
Behind the Desk
|
||||
</a>
|
||||
<div class="hidden md:flex">
|
||||
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="/">top 🔥</a>
|
||||
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">new</a>
|
||||
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">nearby</a>
|
||||
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">past</a>
|
||||
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">ask</a>
|
||||
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">show</a>
|
||||
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">submit</a>
|
||||
<nav class="fixed top-0 left-0 right-0 bg-navbar-bg border-b border-navbar-border z-10" role="navigation" aria-label="main navigation">
|
||||
<div class="max-w-screen-lg mx-auto px-4">
|
||||
<div class="flex justify-between">
|
||||
<div class="flex">
|
||||
<a class="py-4 px-3 font-bold text-primary" href="/">
|
||||
Behind the Desk
|
||||
</a>
|
||||
<div class="hidden md:flex">
|
||||
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary font-semibold" href="#">top 🔥</a>
|
||||
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">new</a>
|
||||
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">nearby</a>
|
||||
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">past</a>
|
||||
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">ask</a>
|
||||
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">show</a>
|
||||
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">submit</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-center">
|
||||
<div class="py-4 px-3">
|
||||
<a href="/login.html" class="text-primary hover:bg-opacity-5 hover:bg-primary">login</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Mobile menu button -->
|
||||
<div class="md:hidden flex items-center">
|
||||
<button id="menuButton" class="text-primary p-3" aria-label="menu" aria-expanded="false">
|
||||
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"></path>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-center">
|
||||
<div class="py-4 px-3">
|
||||
<a href="/login.html" class="text-primary hover:bg-opacity-5 hover:bg-primary">login</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="md:hidden flex items-center">
|
||||
<button id="menuButton" class="text-primary p-3" aria-label="menu" aria-expanded="false">
|
||||
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"></path>
|
||||
</svg>
|
||||
</button>
|
||||
<!-- Mobile Menu -->
|
||||
<div id="mobileMenu" class="hidden md:hidden">
|
||||
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary font-semibold" href="#">top 🔥</a>
|
||||
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">new</a>
|
||||
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">nearby</a>
|
||||
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">past</a>
|
||||
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">ask</a>
|
||||
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">show</a>
|
||||
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">submit</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="mobileMenu" class="hidden md:hidden">
|
||||
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="/">top 🔥</a>
|
||||
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">new</a>
|
||||
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">nearby</a>
|
||||
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">past</a>
|
||||
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">ask</a>
|
||||
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">show</a>
|
||||
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">submit</a>
|
||||
</nav>
|
||||
|
||||
<main class="py-4 pb-16">
|
||||
<div class="max-w-md mx-auto 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>
|
||||
<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>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</main>
|
||||
|
||||
<main class="py-4 pb-16">
|
||||
<div class="max-w-md mx-auto 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>
|
||||
<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>
|
||||
</div>
|
||||
</form>
|
||||
<footer class="bg-gray-200 py-8 px-6 text-text-muted">
|
||||
<div class="max-w-screen-lg mx-auto">
|
||||
<div class="mt-4 text-sm">
|
||||
<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">Terms</a>
|
||||
<a href="#" class="text-text-muted mx-2 no-underline hover:underline">Contact</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</footer>
|
||||
|
||||
<footer class="bg-gray-200 py-8 px-6 text-text-muted">
|
||||
<div class="max-w-screen-lg mx-auto">
|
||||
<div class="mt-4 text-sm">
|
||||
<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">Terms</a>
|
||||
<a href="#" class="text-text-muted mx-2 no-underline hover:underline">Contact</a>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const menuButton = document.getElementById('menuButton');
|
||||
const mobileMenu = document.getElementById('mobileMenu');
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const menuButton = document.getElementById('menuButton');
|
||||
const mobileMenu = document.getElementById('mobileMenu');
|
||||
|
||||
menuButton.addEventListener('click', () => {
|
||||
mobileMenu.classList.toggle('hidden');
|
||||
const expanded = menuButton.getAttribute('aria-expanded') === 'true';
|
||||
menuButton.setAttribute('aria-expanded', !expanded);
|
||||
menuButton.addEventListener('click', () => {
|
||||
mobileMenu.classList.toggle('hidden');
|
||||
const expanded = menuButton.getAttribute('aria-expanded') === 'true';
|
||||
menuButton.setAttribute('aria-expanded', !expanded);
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user