Showing
4 changed files
with
37 additions
and
27 deletions
| 1 | <script> | 1 | <script> |
| 2 | - export let name; | 2 | + import Router from 'svelte-spa-router'; |
| 3 | + import routes from './routes'; | ||
| 3 | </script> | 4 | </script> |
| 4 | 5 | ||
| 5 | -<main> | ||
| 6 | - <h1>Hello {name}!</h1> | ||
| 7 | - <p>Visit the <a href="https://svelte.dev/tutorial">Svelte tutorial</a> to learn how to build Svelte apps.</p> | ||
| 8 | -</main> | ||
| 9 | - | ||
| 10 | -<style> | ||
| 11 | - main { | ||
| 12 | - text-align: center; | ||
| 13 | - padding: 1em; | ||
| 14 | - max-width: 240px; | ||
| 15 | - margin: 0 auto; | ||
| 16 | - } | ||
| 17 | - | ||
| 18 | - h1 { | ||
| 19 | - color: #ff3e00; | ||
| 20 | - text-transform: uppercase; | ||
| 21 | - font-size: 4em; | ||
| 22 | - font-weight: 100; | ||
| 23 | - } | ||
| 24 | - | ||
| 25 | - @media (min-width: 640px) { | ||
| 26 | - main { | ||
| 27 | - max-width: none; | ||
| 28 | - } | ||
| 29 | - } | ||
| 30 | -</style> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 6 | +<Router {routes} /> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
app/web/src/routes.js
0 → 100644
app/web/src/routes/Home.svelte
0 → 100644
| 1 | +<main> | ||
| 2 | + <h1>Hello, This is Home!</h1> | ||
| 3 | + <p>Visit the <a href="https://svelte.dev/tutorial">Svelte tutorial</a> to learn how to build Svelte apps.</p> | ||
| 4 | +</main> | ||
| 5 | + | ||
| 6 | +<style> | ||
| 7 | + main { | ||
| 8 | + text-align: center; | ||
| 9 | + padding: 1em; | ||
| 10 | + max-width: 240px; | ||
| 11 | + margin: 0 auto; | ||
| 12 | + } | ||
| 13 | + | ||
| 14 | + h1 { | ||
| 15 | + color: #ff3e00; | ||
| 16 | + text-transform: uppercase; | ||
| 17 | + font-size: 4em; | ||
| 18 | + font-weight: 100; | ||
| 19 | + } | ||
| 20 | + | ||
| 21 | + @media (min-width: 640px) { | ||
| 22 | + main { | ||
| 23 | + max-width: none; | ||
| 24 | + } | ||
| 25 | + } | ||
| 26 | +</style> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
-
Please register or login to post a comment