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:
2026-04-02 13:14:12 +02:00
parent d3fa8991fe
commit 8f33f469de
2 changed files with 60 additions and 0 deletions

View 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>