upgrade to svelte 5

This commit is contained in:
2025-02-07 17:24:34 +01:00
parent fc9c9de719
commit 8ca76d21d0
6 changed files with 630 additions and 560 deletions

View File

@ -1,22 +1,20 @@
<script lang="ts">
import "./app.css";
import { Navbar, NavBrand, DarkMode } from "flowbite-svelte";
import { Router, Route } from "svelte-routing";
import { Router, Route, Link } from "svelte-routing";
import Home from "./routes/Home.svelte";
import "./app.css";
export let url = "";
import { Navbar, NavBrand, DarkMode } from "flowbite-svelte";
let url: string = $state();
</script>
<main class="flex-col h-screen items-center bg-gray-50 dark:bg-gray-800">
<Navbar>
<NavBrand>
<span>Wails</span>
</NavBrand>
<DarkMode />
</Navbar>
<Router {url}>
<div>
<Route path="/"><Home /></Route>
</div>
<Router bind:url>
<Navbar>
<NavBrand>
<Link to="/">HOME</Link>
</NavBrand>
<DarkMode />
</Navbar>
<Route path="/"><Home /></Route>
</Router>
</main>

View File

@ -1,7 +1,8 @@
import './style.css'
import App from './App.svelte'
import { mount } from "svelte";
const app = new App({
const app = mount(App, {
target: document.getElementById('app')
})