@ -2,9 +2,11 @@
import { browser } from '$app/environment';
import { browser } from '$app/environment';
import { page } from '$app/stores';
import { page } from '$app/stores';
import { Icon , Shell } from '@sveltejs/site-kit/components';
import { Icon , Shell } from '@sveltejs/site-kit/components';
import { Nav , NavItem, Separator } from '@sveltejs/site-kit/nav';
import { Nav , Separator } from '@sveltejs/site-kit/nav';
import { Search , SearchBox } from '@sveltejs/site-kit/search';
import { Search , SearchBox } from '@sveltejs/site-kit/search';
import '@sveltejs/site-kit/styles/index.css';
import '@sveltejs/site-kit/styles/index.css';
export let data;
< / script >
< / script >
< svelte:head >
< svelte:head >
@ -17,7 +19,7 @@
< div style:display = { $page . url . pathname !== '/docs' ? 'contents' : 'none' } >
< div style:display = { $page . url . pathname !== '/docs' ? 'contents' : 'none' } >
< Shell nav_visible = { $page . url . pathname !== '/repl/embed' } >
< Shell nav_visible = { $page . url . pathname !== '/repl/embed' } >
< Nav slot = "top-nav" >
< Nav slot = "top-nav" title = {data . nav_title } links= { data . nav_links } >
< svelte:fragment slot = "home-large" >
< svelte:fragment slot = "home-large" >
< strong > svelte< / strong > .dev
< strong > svelte< / strong > .dev
< / svelte:fragment >
< / svelte:fragment >
@ -26,62 +28,24 @@
< strong > svelte< / strong >
< strong > svelte< / strong >
< / svelte:fragment >
< / svelte:fragment >
< svelte:fragment slot = " nav-center ">
< svelte:fragment slot = " search ">
{ #if $page . url . pathname !== '/search' }
{ #if $page . url . pathname !== '/search' }
< li> < Search / > < / li >
< Search / >
{ /if }
{ /if }
< / svelte:fragment >
< / svelte:fragment >
< svelte:fragment slot = "nav-right" >
< svelte:fragment slot = "external-links" >
< NavItem
< a href = "https://kit.svelte.dev" > SvelteKit< / a >
href="/tutorial"
selected={ $page . url . pathname . startsWith ( '/tutorial' ) || null }
relatedMenuName="tutorial"
>
Tutorial
< / NavItem >
< NavItem
href="/docs/introduction"
selected={ $page . url . pathname . startsWith ( '/docs' ) || null }
relatedMenuName="docs"
>
Docs
< / NavItem >
< NavItem
href="/examples"
selected={ $page . url . pathname . startsWith ( '/examples' ) || null }
relatedMenuName="examples"
>
Examples
< / NavItem >
< NavItem href = "/repl" selected = { $page . url . pathname . startsWith ( '/repl' ) || null } >
REPL
< / NavItem >
< NavItem
href="/blog"
selected={ $page . url . pathname . startsWith ( '/blog' ) || null }
relatedMenuName="blog"
>
Blog
< / NavItem >
< Separator / >
< NavItem href = "https://kit.svelte.dev" external > SvelteKit< / NavItem >
< N avItem href = "/chat" external title = "Discord Chat" >
< a href = "/chat" title = "Discord Chat" >
< span slot = "small" > Discord< / span >
< span class = "small" > Discord< / span >
< Icon name = "discord" / >
< span class = "large" > < Icon name = "discord" / > < / span >
< / N avItem >
< / a >
< N avItem href = "https://github.com/sveltejs/svelte" external title = "GitHub Repo" >
< a href = "https://github.com/sveltejs/svelte" title = "GitHub Repo" >
< span slot = "small" > GitHub< / span >
< span class = "small" > GitHub< / span >
< Icon name = "github" / >
< span class = "large" > < Icon name = "github" / > < / span >
< / N avItem >
< / a >
< / svelte:fragment >
< / svelte:fragment >
< / Nav >
< / Nav >