@ -2,9 +2,11 @@
import { browser } from '$app/environment';
import { page } from '$app/stores';
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 '@sveltejs/site-kit/styles/index.css';
export let data;
< / script >
< svelte:head >
@ -17,7 +19,7 @@
< div style:display = { $page . url . pathname !== '/docs' ? 'contents' : 'none' } >
< 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" >
< strong > svelte< / strong > .dev
< / svelte:fragment >
@ -26,62 +28,24 @@
< strong > svelte< / strong >
< / svelte:fragment >
< svelte:fragment slot = " nav-center ">
< svelte:fragment slot = " search ">
{ #if $page . url . pathname !== '/search' }
< li> < Search / > < / li >
< Search / >
{ /if }
< / svelte:fragment >
< svelte:fragment slot = "nav-right" >
< NavItem
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 >
< svelte:fragment slot = "external-links" >
< a href = "https://kit.svelte.dev" > SvelteKit< / a >
< N avItem href = "/chat" external title = "Discord Chat" >
< span slot = "small" > Discord< / span >
< Icon name = "discord" / >
< / N avItem >
< a href = "/chat" title = "Discord Chat" >
< span class = "small" > Discord< / span >
< span class = "large" > < Icon name = "discord" / > < / span >
< / a >
< N avItem href = "https://github.com/sveltejs/svelte" external title = "GitHub Repo" >
< span slot = "small" > GitHub< / span >
< Icon name = "github" / >
< / N avItem >
< a href = "https://github.com/sveltejs/svelte" title = "GitHub Repo" >
< span class = "small" > GitHub< / span >
< span class = "large" > < Icon name = "github" / > < / span >
< / a >
< / svelte:fragment >
< / Nav >