Add assets and header component
This commit is contained in:
4
src/routes/+layout.svelte
Normal file
4
src/routes/+layout.svelte
Normal file
@@ -0,0 +1,4 @@
|
||||
<script>
|
||||
import '../app.css'
|
||||
</script>
|
||||
<slot />
|
||||
@@ -1,7 +1,20 @@
|
||||
<script>
|
||||
import Menu from '../components/header-menu.svelte'
|
||||
import Menu from '../components/header.svelte'
|
||||
export const prerender = true;
|
||||
const title = "Test Route"
|
||||
</script>
|
||||
<Menu />
|
||||
<h1>Welcome to SvelteKit</h1>
|
||||
<p>Visit <a href="https://kit.svelte.dev">kit.svelte.dev</a> to read the documentation</p>
|
||||
<svelte:head>
|
||||
<title>OwlBoard - {title}</title>
|
||||
</svelte:head>
|
||||
|
||||
|
||||
<Menu {title} />
|
||||
<h1>owlboard-svelte</h1>
|
||||
<p><a href="/public-board?zzz">public-board</a></p>
|
||||
|
||||
|
||||
<style>
|
||||
h1 {
|
||||
font-family: urwgothic;
|
||||
}
|
||||
</style>
|
||||
@@ -1,11 +1,9 @@
|
||||
<script>
|
||||
export const prerender = true;
|
||||
import Menu from '../../components/header.svelte'
|
||||
const testText = "This should not appear in markup"
|
||||
</script>
|
||||
|
||||
<h2>Test Route</h2>
|
||||
<Menu />
|
||||
|
||||
<style>
|
||||
h2 {
|
||||
color: palevioletred;
|
||||
}
|
||||
</style>
|
||||
<h1>Test Route</h1>
|
||||
<p>{testText}</p>
|
||||
|
||||
Reference in New Issue
Block a user