feat: "spa", but more like single entry-point

This commit is contained in:
2026-09-16 23:25:16 +02:00
parent 13b14abb12
commit 15590e5162
30 changed files with 252 additions and 277 deletions
+11
View File
@@ -0,0 +1,11 @@
// Per-page data Django injects via `{{ bootstrap|json_script:"bootstrap-data" }}`
// in templates/app.html. Read once at boot, before the router/app are created.
export const bootstrap: Record<string, unknown> = (() => {
const el = document.getElementById("bootstrap-data");
if (!el?.textContent) return {};
try {
return JSON.parse(el.textContent);
} catch {
return {};
}
})();