feat(nav): add TabletNavBar with horizontal pills and active state
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
22
frontend/src/lib/nav/TabletNavBar.svelte
Normal file
22
frontend/src/lib/nav/TabletNavBar.svelte
Normal file
@@ -0,0 +1,22 @@
|
||||
<script lang="ts">
|
||||
import { page } from '$app/stores';
|
||||
import { mobileNavItems } from './nav';
|
||||
</script>
|
||||
|
||||
<nav
|
||||
aria-label="Hauptnavigation"
|
||||
class="hidden md:flex lg:hidden gap-2 items-center p-2"
|
||||
>
|
||||
{#each mobileNavItems as item (item.href)}
|
||||
{@const active = $page.url.pathname.startsWith(item.href)}
|
||||
<a
|
||||
href={item.href}
|
||||
aria-current={active ? 'page' : undefined}
|
||||
class="px-4 py-2 rounded-[var(--radius-md)] text-[13px] font-[var(--font-sans)] {active
|
||||
? 'bg-[var(--green-tint)] text-[var(--green-dark)] font-medium'
|
||||
: ''}"
|
||||
>
|
||||
{item.label}
|
||||
</a>
|
||||
{/each}
|
||||
</nav>
|
||||
Reference in New Issue
Block a user