diff options
| author | Marin Ivanov <[email protected]> | 2024-08-21 03:31:41 +0300 |
|---|---|---|
| committer | Marin Ivanov <[email protected]> | 2024-08-21 03:31:41 +0300 |
| commit | 8354a7fae28e0bcc7a0eb1b6337f6da0d0769c94 (patch) | |
| tree | d57e9875407b723f6d7f6e2d27dfad0f74f22517 /app.js | |
| parent | 193f4933a8a83ee191b5d3bb8b8b8237dc03bf7d (diff) | |
force app to be at /
Diffstat (limited to 'app.js')
| -rw-r--r-- | app.js | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -73,7 +73,7 @@ return (h) => nav( labelfor("showmenu", span("☰"), " Menu"), input("checkbox").$attr("id", "showmenu"), - ...navs.map(([href,txt]) => ahref(href,txt).$cls(href===h?"active":"")) + ...navs.map(([href,txt]) => ahref(href,txt).$cls(href.substring(1)===h?"active":"")) ); } function CRouter(routes) { @@ -120,8 +120,8 @@ ) } let navbar = CNav([ - ["#", "Home"], - ...entries(config.sections).map(([id, x]) => [`#/${id}`, x.title]), + ["/#", "Home"], + ...entries(config.sections).map(([id, x]) => [`/#/${id}`, x.title]), ]); let router = CRouter({ "/": () => div( |
