Initial commit
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
<script lang="ts">
|
||||
import * as Sidebar from '$lib/components/ui/sidebar/index.js';
|
||||
import { page } from '$app/state';
|
||||
import Separator from '$lib/components/ui/separator/separator.svelte';
|
||||
let { children } = $props();
|
||||
|
||||
const items = [
|
||||
{
|
||||
title: 'Account',
|
||||
url: '/settings/account'
|
||||
},
|
||||
{
|
||||
title: 'Libraries',
|
||||
url: '/settings/libraries'
|
||||
}
|
||||
];
|
||||
</script>
|
||||
|
||||
<div class="flex h-[calc(100vh-var(--header-height)-2rem)] flex-col">
|
||||
<h1 class="text-xl font-bold">Settings</h1>
|
||||
<Separator class="my-4" />
|
||||
<div class="flex flex-1 gap-6 overflow-hidden">
|
||||
<div class="flex gap-8">
|
||||
<Sidebar.Provider class="shrink-0">
|
||||
<Sidebar.Inset>
|
||||
<Sidebar.Content>
|
||||
<Sidebar.Group class="flex flex-col gap-1">
|
||||
{#each items as item}
|
||||
<Sidebar.MenuItem class="w-48">
|
||||
<Sidebar.MenuButton
|
||||
class="rounded hover:bg-muted {page.url.pathname.endsWith(item.url)
|
||||
? 'bg-muted'
|
||||
: ''}"
|
||||
>
|
||||
{#snippet child({ props })}
|
||||
<a href={item.url} {...props}>
|
||||
<span class="text-base">{item.title}</span>
|
||||
</a>
|
||||
{/snippet}
|
||||
</Sidebar.MenuButton>
|
||||
</Sidebar.MenuItem>
|
||||
{/each}
|
||||
</Sidebar.Group>
|
||||
</Sidebar.Content>
|
||||
</Sidebar.Inset>
|
||||
</Sidebar.Provider>
|
||||
</div>
|
||||
<Separator orientation="vertical" class="self-stretch" />
|
||||
<div class="mx-2 mt-2 flex-1 overflow-auto">{@render children()}</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user