mirror of
https://github.com/kevin-DL/sapper-template.git
synced 2026-01-15 03:24:48 +00:00
experimental new structure
This commit is contained in:
31
app/App.html
Normal file
31
app/App.html
Normal file
@@ -0,0 +1,31 @@
|
||||
<Nav page={
|
||||
props.path === '/' ? 'home' :
|
||||
props.path === '/about' ? 'about' :
|
||||
props.path.startsWith('/blog') ? 'blog' :
|
||||
null
|
||||
}/>
|
||||
|
||||
<main>
|
||||
<svelte:component this={Page} {...props}/>
|
||||
</main>
|
||||
|
||||
<style>
|
||||
main {
|
||||
position: relative;
|
||||
max-width: 56em;
|
||||
background-color: white;
|
||||
padding: 2em;
|
||||
margin: 0 auto;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
import Nav from '../components/Nav.html';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Nav
|
||||
}
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user