Router transition

This commit is contained in:
2026-04-06 19:05:13 +02:00
parent bf3069d439
commit 9666c3d034
7 changed files with 10 additions and 10 deletions

2
dist/sigpro.esm.js vendored
View File

@@ -365,7 +365,7 @@ var For = (source, renderFn, keyFn, tag = "div", props = { style: "display:conte
var Router = (routes) => {
const currentPath = $(window.location.hash.replace(/^#/, "") || "/");
window.addEventListener("hashchange", () => currentPath(window.location.hash.replace(/^#/, "") || "/"));
const outlet = Tag("div", { class: "router-outlet" });
const outlet = Tag("div", { class: "router-transition" });
let currentView = null;
Watch([currentPath], async () => {
const path = currentPath();