refactor(web): change routing libraries and app design

This commit is contained in:
Luke committed 2023-03-18 22:34:14 +01:00
1 parent e04a43a86c
commit 2a11ded518
11 files changed
+74 -52

No files matched your search

+13 -6
View File
@@ -1,12 +1,19 @@
<script lang="ts">
import Router from 'svelte-spa-router';
import Navbar from './components/Navbar.svelte';
import { routes } from './routes';
import { Route, router } from 'tinro';
import Resource from './pages/resource/Resource.svelte';
import Root from './pages/root/Root.svelte';
router.mode.hash();
</script>
<main class="w-full h-full flex justify-center items-center font-main">
<div class="bg-slate-900 text-white w-[1200px] h-[650px] flex rounded-md">
<Navbar />
<Router {routes} />
<div class="bg-slate-900 text-white w-[1000px] h-[600px] flex rounded-md">
<!-- <Navbar /> -->
<Route path="/">
<Root />
</Route>
<Route path="/:resource">
<Resource />
</Route>
</div>
</main>