summaryrefslogtreecommitdiff
path: root/web/src/index-page.tsx
diff options
context:
space:
mode:
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() );