summaryrefslogtreecommitdiff
path: root/web/src/index-page.tsx
diff options
context:
space:
mode:
authornavewindre <boneyaard@gmail.com>2025-11-11 08:11:24 +0100
committernavewindre <boneyaard@gmail.com>2025-11-11 08:11:24 +0100
commitf5e29189f70c5c8532916504a1a22f8c586f6e73 (patch)
tree9bf42144e608260527766e128268b380231ed95b /web/src/index-page.tsx
parent6442494822d12c23cdd609031c4039d3309b64f6 (diff)
new web
Diffstat (limited to 'web/src/index-page.tsx')
-rw-r--r--web/src/index-page.tsx14
1 files changed, 14 insertions, 0 deletions
diff --git a/web/src/index-page.tsx b/web/src/index-page.tsx
new file mode 100644
index 0000000..4b7ce1c
--- /dev/null
+++ b/web/src/index-page.tsx
@@ -0,0 +1,14 @@
+import * as JSX from "./jsx";
+import Home from "./home";
+import Blog from "./blog";
+import Pkgs from "./pkg";
+
+JSX.addRoute( "/", () => <Home /> );
+JSX.addRoute( "/blog", () => <Blog /> );
+JSX.addRoute( "/pkg", () => <Pkgs /> );
+JSX.addRoute( "/pkg/*", () => <Pkgs /> );
+
+window.onpopstate = JSX.onPopState;
+
+const url = new URL( window.location.href );
+JSX.navigateParams( url.pathname, url.searchParams.entries() );