This commit is contained in:
2021-03-22 16:54:31 +01:00
parent 2ee7f650db
commit 0aca310a5e
5 changed files with 294 additions and 0 deletions

View File

@@ -1,5 +1,17 @@
<h1>__PROJECT_TITLE__</h1>
<div use:links>
<a href="/test1">1</a>
<a href="/test2">2</a>
<a href="/test3">3</a>
<a href="/test4">4</a>
<Router url="{url}">
<Route path="/*path" let:params>
<Content path="/{params.path}" />
</Route>
</Router>
</div>
<style lang="less">
h1 {
color: red;
@@ -7,8 +19,10 @@
</style>
<script lang="typescript">
import { Router, Route, links } from "svelte-routing"
import { scrollToTop } from "svelte-scrollto"
import { location } from "../store"
import Content from "./Content.svelte"
export let url = ""
if (url) {