nox/src/App.svelte

29 lines
813 B
Svelte
Raw Normal View History

2023-08-11 18:06:00 +02:00
<script lang="ts">
import Load from './page/Load/Load.svelte';
2023-08-13 03:09:34 +02:00
import Home from './page/Home/Home.svelte';
2023-08-11 18:06:00 +02:00
import Titlebar from './widget/Titlebar/Titlebar.svelte';
2023-08-13 03:09:34 +02:00
import { Router, Link, Route, navigate } from "svelte-routing";
import RouteStore from './store/RouteStore';
export let url = "/load";
RouteStore.subscribe(() => {
url = RouteStore.getState().path;
navigate(url);
});
RouteStore.dispatch({ type: 'setPath', path: '/load' })
setTimeout(() => { RouteStore.dispatch({ type: 'setPath', path: '/' }) }, 3000)
2023-08-11 18:06:00 +02:00
</script>
<Titlebar />
2023-08-11 18:20:15 +02:00
<div class='backdrop'>
2023-08-12 09:11:19 +02:00
<div class='delay-show'>
2023-08-13 03:09:34 +02:00
<Router {url}>
<Route path='/' component={Home} />
<Route path='/load' component={Load} />
</Router>
2023-08-12 09:11:19 +02:00
</div>
2023-08-11 18:20:15 +02:00
</div>