Skip to content

Commit

Permalink
docs: minor layout adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
ciscorn committed Jan 9, 2025
1 parent 0be88a4 commit 901317b
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 24 deletions.
14 changes: 11 additions & 3 deletions src/routes/GlobalToc.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
import CloseIcon from 'lucide-svelte/icons/x';
import { cn } from '$lib/utils';
import { toc } from '$content/examples/toc';
import { toc as docsToc } from '$content/docs/toc';
import { toc as componentsToc } from '$content/components/toc';
import { toc as examplesToc } from '$content/examples/toc';
import { beforeNavigate } from '$app/navigation';
import { Button } from '$lib/components/ui/button';
Expand Down Expand Up @@ -43,8 +45,14 @@
<CloseIcon class="!size-6"></CloseIcon>
</Button>
</div>
<div class="p-8">
<Index name="Examples" {toc}></Index>
<div class="p-8 pb-0">
<Index name="Docs" toc={docsToc}></Index>
</div>
<div class="p-8 pb-0">
<Index name="Examples" toc={examplesToc}></Index>
</div>
<div class="p-8 pb-0">
<Index name="API Reference" toc={componentsToc}></Index>
</div>
</div>
</div>
6 changes: 3 additions & 3 deletions src/routes/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,19 @@
</h1>
<nav class="ml-12 hidden gap-x-6 font-medium min-[550px]:flex">
<a
href="/docs/"
href="/docs/quickstart"
data-active={page.url.pathname.startsWith('/docs') && !page.url.pathname.startsWith('/docs/components')}
class="text-sm text-foreground/70 transition-colors hover:text-foreground data-[active=true]:font-semibold"
>Docs
</a>
<a
href="/examples/"
href="/examples/plain"
data-active={page.url.pathname.startsWith('/examples')}
class="text-sm text-foreground/70 transition-colors hover:text-foreground data-[active=true]:font-semibold"
>Examples</a
>
<a
href="/docs/components/"
href="/docs/components/MapLibre"
data-active={page.url.pathname.startsWith('/docs/components')}
class="text-sm text-foreground/70 transition-colors hover:text-foreground data-[active=true]:font-semibold"
>API Reference</a
Expand Down
2 changes: 1 addition & 1 deletion src/routes/docs/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
import { toc } from '$content/docs/toc.js';
</script>

<div id="toc" class="m-auto p-8 xl:container">
<div id="toc" class="m-auto p-8 py-10 xl:container">
<Index name="Docs" {toc} />
</div>
5 changes: 0 additions & 5 deletions src/routes/docs/+page.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/routes/docs/components/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
import { toc } from '$content/components/toc.js';
</script>

<div id="toc" class="m-auto p-8 xl:container">
<div id="toc" class="m-auto p-8 py-10 xl:container">
<Index name="API Reference" {toc} />
</div>
5 changes: 0 additions & 5 deletions src/routes/docs/components/+page.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/routes/examples/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
import { toc } from '$content/examples/toc.js';
</script>

<div id="toc" class="m-auto p-8 xl:container">
<div id="toc" class="m-auto p-8 py-10 xl:container">
<Index name="Examples" {toc} />
</div>
5 changes: 0 additions & 5 deletions src/routes/examples/+page.ts

This file was deleted.

0 comments on commit 901317b

Please sign in to comment.