Rename the app shell components folder and move AccountMenu next to its consumers

This commit is contained in:
2026-09-24 13:57:35 +02:00
parent e7c2fd5571
commit 2361b88e0a
10 changed files with 506 additions and 8 deletions
@@ -0,0 +1,32 @@
<script lang="ts">
import { appNavLinks, isNavActive } from './navLinks';
import type { SessionUser } from '$lib/types';
interface Props {
user: SessionUser | null;
class?: string;
}
let { user, class: klass = '' }: Props = $props();
const links = $derived(appNavLinks(user).filter((link) => link.primary));
</script>
<nav
class="pointer-events-auto flex items-center justify-around px-4 py-2 glass-bar lg:hidden {klass}"
style="padding-bottom:calc(0.4375rem + var(--mf-safe-b))"
>
{#each links as link (link.href)}
{@const active = isNavActive(link.href)}
<a
href={link.href}
aria-current={active ? 'page' : undefined}
class="flex flex-col items-center gap-1 rounded-control px-2.5 py-1.5 {active
? 'text-fg'
: 'text-fg-2'}"
>
<link.icon class="size-icon-sm" />
<span class="text-xs font-medium">{link.label}</span>
</a>
{/each}
</nav>