2024-07-08 22:43:50 +02:00
|
|
|
<script lang="ts">
|
|
|
|
import { Button } from '$lib/components/ui/button';
|
|
|
|
import { getURLForLanguage } from '$lib/utils';
|
|
|
|
import { locale } from 'svelte-i18n';
|
|
|
|
import DocsLoader from '$lib/components/docs/DocsLoader.svelte';
|
2024-07-09 10:08:26 +02:00
|
|
|
import { page } from '$app/stores';
|
2024-07-09 17:49:18 +02:00
|
|
|
import { guides } from '$lib/components/docs/docs';
|
2024-07-08 22:43:50 +02:00
|
|
|
</script>
|
|
|
|
|
2024-08-12 14:18:41 +02:00
|
|
|
<div class="px-12 pt-6 pb-12 flex flex-row gap-24">
|
|
|
|
<div class="hidden md:flex flex-col gap-2 w-40 sticky top-[108px] self-start shrink-0">
|
2024-07-08 22:43:50 +02:00
|
|
|
{#each Object.keys(guides) as guide}
|
|
|
|
<Button
|
|
|
|
variant="link"
|
2024-07-08 23:22:37 +02:00
|
|
|
href={getURLForLanguage($locale, `/help/${guide}`)}
|
2024-07-11 18:42:49 +02:00
|
|
|
class="h-fit p-0 w-fit text-muted-foreground hover:text-foreground hover:no-underline font-normal hover:font-semibold items-start whitespace-normal {$page
|
2024-07-09 10:08:26 +02:00
|
|
|
.params.guide === guide
|
|
|
|
? 'font-semibold text-foreground'
|
|
|
|
: ''}"
|
2024-07-08 22:43:50 +02:00
|
|
|
>
|
2024-07-09 17:49:18 +02:00
|
|
|
<DocsLoader path={`${guide}.mdx`} titleOnly={true} />
|
2024-07-08 22:43:50 +02:00
|
|
|
</Button>
|
|
|
|
{#each guides[guide] as subGuide}
|
|
|
|
<Button
|
|
|
|
variant="link"
|
2024-07-08 23:22:37 +02:00
|
|
|
href={getURLForLanguage($locale, `/help/${guide}/${subGuide}`)}
|
2024-07-11 18:42:49 +02:00
|
|
|
class="h-fit p-0 w-fit text-muted-foreground hover:text-foreground hover:no-underline font-normal hover:font-semibold items-start whitespace-normal ml-3 {$page
|
2024-07-09 10:08:26 +02:00
|
|
|
.params.guide ===
|
|
|
|
guide + '/' + subGuide
|
|
|
|
? 'font-semibold text-foreground'
|
|
|
|
: ''}"
|
2024-07-08 22:43:50 +02:00
|
|
|
>
|
2024-07-09 17:49:18 +02:00
|
|
|
<DocsLoader path={`${guide}/${subGuide}.mdx`} titleOnly={true} />
|
2024-07-08 22:43:50 +02:00
|
|
|
</Button>
|
|
|
|
{/each}
|
|
|
|
{/each}
|
|
|
|
</div>
|
2024-07-09 17:49:18 +02:00
|
|
|
<div class="grow">
|
|
|
|
<slot />
|
|
|
|
</div>
|
2024-07-08 22:43:50 +02:00
|
|
|
</div>
|