This commit is contained in:
vcoppe
2025-06-21 21:07:36 +02:00
parent f0230d4634
commit 1cc07901f6
803 changed files with 7937 additions and 6329 deletions

View File

@@ -1,13 +1,20 @@
<script lang="ts">
import { Button } from '$lib/components/ui/button';
import { getURLForLanguage } from '$lib/utils';
import { locale } from '$lib/i18n';
import { page } from '$app/stores';
import { i18n } from '$lib/i18n.svelte';
import { page } from '$app/state';
import { guides } from '$lib/components/docs/docs';
import type { Snippet } from 'svelte';
export let data: {
guideTitles: Record<string, string>;
};
let {
data,
children,
}: {
data: {
guideTitles: Record<string, string>;
};
children: Snippet;
} = $props();
</script>
<div class="grow px-12 pt-6 pb-12 flex flex-row gap-24">
@@ -17,8 +24,8 @@
{#each Object.keys(guides) as guide}
<Button
variant="link"
href={getURLForLanguage($locale, `/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
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
? 'font-semibold text-foreground'
: ''}"
@@ -28,8 +35,8 @@
{#each guides[guide] as subGuide}
<Button
variant="link"
href={getURLForLanguage($locale, `/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
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'
@@ -41,6 +48,6 @@
{/each}
</div>
<div class="grow">
<slot />
{@render children()}
</div>
</div>