Skip to content

Commit

Permalink
fix: layout by url in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
TorstenDittmann committed Jan 22, 2024
1 parent 1f34da1 commit d0d842d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/routes/docs/quick-starts/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import Sidebar from '../Sidebar.svelte';
</script>

<Docs variant={$page.url.pathname.endsWith('/quick-starts') ? 'default' : 'two-side-navs'}>
<Docs variant={$page.route.id === '/docs/quick-starts' ? 'default' : 'two-side-navs'}>
<Sidebar />
<slot />
</Docs>
2 changes: 1 addition & 1 deletion src/routes/docs/tutorials/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import Docs, { type DocsLayoutVariant } from '$lib/layouts/Docs.svelte';
import Sidebar from '../Sidebar.svelte';
$: variant = $page.url.pathname.endsWith('/tutorials')
$: variant = $page.route.id === '/docs/tutorials'
? 'default'
: ('two-side-navs' as DocsLayoutVariant);
</script>
Expand Down

0 comments on commit d0d842d

Please sign in to comment.