|
25 | 25 | @vite(['resources/css/app.css', 'resources/js/app.js']) |
26 | 26 | </head> |
27 | 27 | <body class="bg-bg text-text antialiased"> |
28 | | - <nav class="relative z-[1100] border-b border-border bg-surface" aria-label="Main navigation"> |
| 28 | + <nav x-data="{ open: false }" class="relative z-[1100] border-b border-border bg-surface" aria-label="Main navigation"> |
29 | 29 | <div class="flex h-16 items-center justify-between px-4 sm:px-6"> |
30 | 30 | <a href="/" class="text-lg font-semibold tracking-tight text-text"> |
31 | 31 | Eonmap |
32 | 32 | </a> |
33 | | - <div class="flex items-center gap-6"> |
| 33 | + |
| 34 | + {{-- Desktop link row --}} |
| 35 | + <div class="hidden sm:flex items-center gap-6"> |
34 | 36 | <x-nav.nav-link href="{{ route('map') }}" :active="request()->routeIs('map')"> |
35 | 37 | Map |
36 | 38 | </x-nav.nav-link> |
|
46 | 48 | <livewire:recently-viewed /> |
47 | 49 | <x-theme-toggle /> |
48 | 50 | </div> |
| 51 | + |
| 52 | + {{-- Mobile: theme toggle + hamburger --}} |
| 53 | + <div class="flex items-center gap-1 sm:hidden"> |
| 54 | + <x-theme-toggle /> |
| 55 | + <button |
| 56 | + x-on:click="open = !open" |
| 57 | + :aria-expanded="open" |
| 58 | + aria-controls="mobile-menu" |
| 59 | + aria-label="Toggle navigation menu" |
| 60 | + class="rounded-md p-2 text-muted hover:bg-surface-hover hover:text-text transition-colors" |
| 61 | + > |
| 62 | + {{-- Hamburger --}} |
| 63 | + <svg x-show="!open" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" aria-hidden="true"> |
| 64 | + <path stroke-linecap="round" stroke-linejoin="round" d="M4 6h16M4 12h16M4 18h16" /> |
| 65 | + </svg> |
| 66 | + {{-- Close --}} |
| 67 | + <svg x-show="open" x-cloak class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" aria-hidden="true"> |
| 68 | + <path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" /> |
| 69 | + </svg> |
| 70 | + </button> |
| 71 | + </div> |
| 72 | + </div> |
| 73 | + |
| 74 | + {{-- Mobile menu panel --}} |
| 75 | + <div |
| 76 | + id="mobile-menu" |
| 77 | + x-show="open" |
| 78 | + x-cloak |
| 79 | + x-on:click.outside="open = false" |
| 80 | + class="sm:hidden border-t border-border bg-surface" |
| 81 | + > |
| 82 | + <x-nav.responsive-nav-link href="{{ route('map') }}" :active="request()->routeIs('map')"> |
| 83 | + Map |
| 84 | + </x-nav.responsive-nav-link> |
| 85 | + <x-nav.responsive-nav-link href="{{ route('browse') }}" :active="request()->routeIs('browse')"> |
| 86 | + Browse |
| 87 | + </x-nav.responsive-nav-link> |
| 88 | + <x-nav.responsive-nav-link href="{{ route('taxa.index') }}" :active="request()->routeIs('taxa.*')"> |
| 89 | + Taxa |
| 90 | + </x-nav.responsive-nav-link> |
| 91 | + <x-nav.responsive-nav-link href="{{ route('guide') }}" :active="request()->routeIs('guide')"> |
| 92 | + Guide |
| 93 | + </x-nav.responsive-nav-link> |
49 | 94 | </div> |
50 | 95 | </nav> |
51 | 96 |
|
|
0 commit comments