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

View File

@@ -370,7 +370,7 @@ const For = (source, renderFn, keyFn, tag = "div", props = { style: "display:con
const 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 () => {