non-blocking docs load

This commit is contained in:
vcoppe
2024-09-20 14:22:55 +02:00
parent a48da3fcf0
commit f77793b7fe
7 changed files with 54 additions and 48 deletions

View File

@@ -6,7 +6,7 @@
import { guides } from '$lib/components/docs/docs';
export let data: {
guideTitles: Record<string, string>;
guideModules: Record<string, any>;
};
</script>
@@ -21,7 +21,9 @@
? 'font-semibold text-foreground'
: ''}"
>
{data.guideTitles[guide]}
{#await data.guideModules[guide] then guideModule}
{guideModule.metadata.title}
{/await}
</Button>
{#each guides[guide] as subGuide}
<Button
@@ -33,7 +35,9 @@
? 'font-semibold text-foreground'
: ''}"
>
{data.guideTitles[`${guide}/${subGuide}`]}
{#await data.guideModules[`${guide}/${subGuide}`] then guideModule}
{guideModule.metadata.title}
{/await}
</Button>
{/each}
{/each}