71 lines
3.9 KiB
Plaintext
71 lines
3.9 KiB
Plaintext
<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-2 px-3 font-bold text-primary" href="/">
|
|
Behind the Desk
|
|
</a>
|
|
<div class="hidden md:flex">
|
|
<a class="py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="/submit">submit</a>
|
|
</div>
|
|
</div>
|
|
<div class="hidden md:flex items-center">
|
|
<a href="/notifications" class="py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary">notifications</a>
|
|
<a href="/login" class="py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary">login</a>
|
|
</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>
|
|
<!-- Mobile Menu -->
|
|
<div id="mobileMenu" class="hidden md:hidden">
|
|
<div class="border-b border-gray-200">
|
|
<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" id="mobile-nearby-link" href="/">nearby</a>
|
|
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" id="mobile-past-link" 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="/">rant</a>
|
|
</div>
|
|
<div class="border-b border-gray-200">
|
|
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="/submit">submit</a>
|
|
</div>
|
|
<div class="border-b border-gray-200">
|
|
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="/notifications">notifications</a>
|
|
</div>
|
|
<div>
|
|
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="/login">login</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<!-- 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);
|
|
});
|
|
}
|
|
|
|
// Removed JavaScript for 'nearby' and 'past' links as they are no longer in the navbar.
|
|
// The filter container logic might need to be re-evaluated or removed if not triggered elsewhere.
|
|
// const filterContainer = document.getElementById('filter-container');
|
|
// const dateDisplay = document.getElementById('date-display');
|
|
// const filterSection = document.getElementById('filter-section');
|
|
// const filterText = document.getElementById('filter-text');
|
|
|
|
});
|
|
</script>
|