|
2 | 2 | import { browser } from '$app/environment';
|
3 | 3 | import { page } from '$app/stores';
|
4 | 4 | import { Icon, Shell } from '@sveltejs/site-kit/components';
|
5 |
| - import { Nav, NavItem, Separator } from '@sveltejs/site-kit/nav'; |
| 5 | + import { Nav, Separator } from '@sveltejs/site-kit/nav'; |
6 | 6 | import { Search, SearchBox } from '@sveltejs/site-kit/search';
|
7 | 7 | import '@sveltejs/site-kit/styles/index.css';
|
| 8 | +
|
| 9 | + export let data; |
8 | 10 | </script>
|
9 | 11 |
|
10 | 12 | <svelte:head>
|
|
17 | 19 |
|
18 | 20 | <div style:display={$page.url.pathname !== '/docs' ? 'contents' : 'none'}>
|
19 | 21 | <Shell nav_visible={$page.url.pathname !== '/repl/embed'}>
|
20 |
| - <Nav slot="top-nav"> |
| 22 | + <Nav slot="top-nav" title={data.nav_title} links={data.nav_links}> |
21 | 23 | <svelte:fragment slot="home-large">
|
22 | 24 | <strong>svelte</strong>.dev
|
23 | 25 | </svelte:fragment>
|
|
26 | 28 | <strong>svelte</strong>
|
27 | 29 | </svelte:fragment>
|
28 | 30 |
|
29 |
| - <svelte:fragment slot="nav-center"> |
| 31 | + <svelte:fragment slot="search"> |
30 | 32 | {#if $page.url.pathname !== '/search'}
|
31 |
| - <li><Search /></li> |
| 33 | + <Search /> |
32 | 34 | {/if}
|
33 | 35 | </svelte:fragment>
|
34 | 36 |
|
35 |
| - <svelte:fragment slot="nav-right"> |
36 |
| - <NavItem |
37 |
| - href="/tutorial" |
38 |
| - selected={$page.url.pathname.startsWith('/tutorial') || null} |
39 |
| - relatedMenuName="tutorial" |
40 |
| - > |
41 |
| - Tutorial |
42 |
| - </NavItem> |
43 |
| - |
44 |
| - <NavItem |
45 |
| - href="/docs/introduction" |
46 |
| - selected={$page.url.pathname.startsWith('/docs') || null} |
47 |
| - relatedMenuName="docs" |
48 |
| - > |
49 |
| - Docs |
50 |
| - </NavItem> |
51 |
| - |
52 |
| - <NavItem |
53 |
| - href="/examples" |
54 |
| - selected={$page.url.pathname.startsWith('/examples') || null} |
55 |
| - relatedMenuName="examples" |
56 |
| - > |
57 |
| - Examples |
58 |
| - </NavItem> |
59 |
| - |
60 |
| - <NavItem href="/repl" selected={$page.url.pathname.startsWith('/repl') || null}> |
61 |
| - REPL |
62 |
| - </NavItem> |
63 |
| - |
64 |
| - <NavItem |
65 |
| - href="/blog" |
66 |
| - selected={$page.url.pathname.startsWith('/blog') || null} |
67 |
| - relatedMenuName="blog" |
68 |
| - > |
69 |
| - Blog |
70 |
| - </NavItem> |
71 |
| - |
72 |
| - <Separator /> |
73 |
| - |
74 |
| - <NavItem href="https://kit.svelte.dev" external>SvelteKit</NavItem> |
| 37 | + <svelte:fragment slot="external-links"> |
| 38 | + <a href="https://kit.svelte.dev">SvelteKit</a> |
75 | 39 |
|
76 |
| - <NavItem href="/chat" external title="Discord Chat"> |
77 |
| - <span slot="small">Discord</span> |
78 |
| - <Icon name="discord" /> |
79 |
| - </NavItem> |
| 40 | + <a href="/chat" title="Discord Chat"> |
| 41 | + <span class="small">Discord</span> |
| 42 | + <span class="large"><Icon name="discord" /></span> |
| 43 | + </a> |
80 | 44 |
|
81 |
| - <NavItem href="https://github.com/sveltejs/svelte" external title="GitHub Repo"> |
82 |
| - <span slot="small">GitHub</span> |
83 |
| - <Icon name="github" /> |
84 |
| - </NavItem> |
| 45 | + <a href="https://github.com/sveltejs/svelte" title="GitHub Repo"> |
| 46 | + <span class="small">GitHub</span> |
| 47 | + <span class="large"><Icon name="github" /></span> |
| 48 | + </a> |
85 | 49 | </svelte:fragment>
|
86 | 50 | </Nav>
|
87 | 51 |
|
|
0 commit comments