// U-008: empty-shell client-side router. Hash-based (no History API / server // catch-all needed) -- real page content is PH3 (U-022+), this just proves // navigation swaps content without a page reload or any build step. const routes = { "#/": () => "

Dashboard

placeholder -- real content is PH3 (v_dashboard, U-025)

", "#/tasks": () => "

Tasks

placeholder -- real content is PH3 (v_task_board, U-025)

", "#/settings": () => "

Settings

placeholder -- real content is PH3 (U-030)

", }; function render() { const hash = window.location.hash || "#/"; const view = routes[hash] || (() => "

Not found

" + hash + "

"); document.getElementById("app").innerHTML = view(); for (const a of document.querySelectorAll("#nav a")) { a.classList.toggle("active", a.getAttribute("href") === hash); } } window.addEventListener("hashchange", render); window.addEventListener("DOMContentLoaded", render);