2024-07-08 22:43:50 +02:00
|
|
|
<script lang="ts">
|
2025-02-02 11:17:22 +01:00
|
|
|
import { Button } from '$lib/components/ui/button';
|
2026-03-28 08:41:30 +01:00
|
|
|
import AlgoliaDocSearch from '$lib/components/AlgoliaDocSearch.svelte';
|
2025-02-02 11:17:22 +01:00
|
|
|
import { getURLForLanguage } from '$lib/utils';
|
2025-06-21 21:07:36 +02:00
|
|
|
import { i18n } from '$lib/i18n.svelte';
|
|
|
|
|
import { page } from '$app/state';
|
2025-02-02 11:17:22 +01:00
|
|
|
import { guides } from '$lib/components/docs/docs';
|
2025-06-21 21:07:36 +02:00
|
|
|
import type { Snippet } from 'svelte';
|
2024-09-20 13:22:05 +02:00
|
|
|
|
2025-06-21 21:07:36 +02:00
|
|
|
let {
|
|
|
|
|
data,
|
|
|
|
|
children,
|
|
|
|
|
}: {
|
|
|
|
|
data: {
|
|
|
|
|
guideTitles: Record<string, string>;
|
|
|
|
|
};
|
|
|
|
|
children: Snippet;
|
|
|
|
|
} = $props();
|
2024-07-08 22:43:50 +02:00
|
|
|
</script>
|
|
|
|
|
|
2026-03-29 20:21:52 +02:00
|
|
|
<div class="grow flex flex-col items-center p-12">
|
2026-03-28 19:41:44 +01:00
|
|
|
<div class="max-w-5xl flex flex-row gap-24">
|
2026-04-01 08:33:17 +02:00
|
|
|
<div class="hidden md:flex flex-col gap-2 w-40 sticky top-[101px] self-start shrink-0">
|
2026-03-28 19:41:44 +01:00
|
|
|
<div class="mb-2">
|
|
|
|
|
<AlgoliaDocSearch />
|
|
|
|
|
</div>
|
|
|
|
|
{#each Object.keys(guides) as guide}
|
2025-02-02 11:17:22 +01:00
|
|
|
<Button
|
|
|
|
|
variant="link"
|
2026-03-28 19:41:44 +01:00
|
|
|
href={getURLForLanguage(i18n.lang, `/help/${guide}`)}
|
|
|
|
|
class="min-h-5 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
|
|
|
|
|
.params.guide === guide
|
2025-02-02 11:17:22 +01:00
|
|
|
? 'font-semibold text-foreground'
|
|
|
|
|
: ''}"
|
|
|
|
|
>
|
2026-03-28 19:41:44 +01:00
|
|
|
{data.guideTitles[guide]}
|
2025-02-02 11:17:22 +01:00
|
|
|
</Button>
|
2026-03-28 19:41:44 +01:00
|
|
|
{#each guides[guide] as subGuide}
|
|
|
|
|
<Button
|
|
|
|
|
variant="link"
|
|
|
|
|
href={getURLForLanguage(i18n.lang, `/help/${guide}/${subGuide}`)}
|
|
|
|
|
class="min-h-5 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
|
|
|
|
|
.params.guide ===
|
|
|
|
|
guide + '/' + subGuide
|
|
|
|
|
? 'font-semibold text-foreground'
|
|
|
|
|
: ''}"
|
|
|
|
|
>
|
|
|
|
|
{data.guideTitles[`${guide}/${subGuide}`]}
|
|
|
|
|
</Button>
|
|
|
|
|
{/each}
|
2025-02-02 11:17:22 +01:00
|
|
|
{/each}
|
2026-03-28 19:41:44 +01:00
|
|
|
</div>
|
|
|
|
|
<div class="grow">
|
|
|
|
|
{@render children()}
|
|
|
|
|
</div>
|
2025-02-02 11:17:22 +01:00
|
|
|
</div>
|
2024-07-08 22:43:50 +02:00
|
|
|
</div>
|