mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-09-02 16:52:31 +00:00
highlight current guide item
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
import { getURLForLanguage } from '$lib/utils';
|
import { getURLForLanguage } from '$lib/utils';
|
||||||
import { locale } from 'svelte-i18n';
|
import { locale } from 'svelte-i18n';
|
||||||
import DocsLoader from '$lib/components/docs/DocsLoader.svelte';
|
import DocsLoader from '$lib/components/docs/DocsLoader.svelte';
|
||||||
|
import { page } from '$app/stores';
|
||||||
|
|
||||||
let guides: Record<string, string[]> = {
|
let guides: Record<string, string[]> = {
|
||||||
'getting-started': [],
|
'getting-started': [],
|
||||||
@@ -18,7 +19,10 @@
|
|||||||
<Button
|
<Button
|
||||||
variant="link"
|
variant="link"
|
||||||
href={getURLForLanguage($locale, `/help/${guide}`)}
|
href={getURLForLanguage($locale, `/help/${guide}`)}
|
||||||
class="h-6 p-0 w-fit text-muted-foreground hover:text-foreground hover:no-underline font-normal hover:font-semibold items-start"
|
class="h-6 p-0 w-fit text-muted-foreground hover:text-foreground hover:no-underline font-normal hover:font-semibold items-start {$page
|
||||||
|
.params.guide === guide
|
||||||
|
? 'font-semibold text-foreground'
|
||||||
|
: ''}"
|
||||||
>
|
>
|
||||||
<DocsLoader path={`${guide}.svx`} titleOnly={true} />
|
<DocsLoader path={`${guide}.svx`} titleOnly={true} />
|
||||||
</Button>
|
</Button>
|
||||||
@@ -26,7 +30,11 @@
|
|||||||
<Button
|
<Button
|
||||||
variant="link"
|
variant="link"
|
||||||
href={getURLForLanguage($locale, `/help/${guide}/${subGuide}`)}
|
href={getURLForLanguage($locale, `/help/${guide}/${subGuide}`)}
|
||||||
class="h-6 p-0 w-fit text-muted-foreground hover:text-foreground hover:no-underline font-normal hover:font-semibold items-start ml-3"
|
class="h-6 p-0 w-fit text-muted-foreground hover:text-foreground hover:no-underline font-normal hover:font-semibold items-start ml-3 {$page
|
||||||
|
.params.guide ===
|
||||||
|
guide + '/' + subGuide
|
||||||
|
? 'font-semibold text-foreground'
|
||||||
|
: ''}"
|
||||||
>
|
>
|
||||||
<DocsLoader path={`${guide}/${subGuide}.svx`} titleOnly={true} />
|
<DocsLoader path={`${guide}/${subGuide}.svx`} titleOnly={true} />
|
||||||
</Button>
|
</Button>
|
||||||
|
Reference in New Issue
Block a user