working on toc

This commit is contained in:
David Allemang
2026-06-17 11:06:41 -04:00
parent 3f637373f5
commit c063b72c41
7 changed files with 159 additions and 65 deletions

View File

@@ -15,10 +15,29 @@
html.title(context title)
})
html.body({
html.header({
html.h1(context title)
html.header(context {
html.h1(title)
})
html.main(content)
})
html.main(content)
html.footer(context {
let prev = query(selector(document).before(here()))
let next = query(selector(document).after(here()))
html.nav(class: "panel", {
if (prev.len() > 1) {
link(prev.at(-2).location(), html.span(class: "go-prev", prev.at(-2).title))
}
if (next.len() > 0) {
link(next.at(0).location(), html.span(class: "go-next", next.at(0).title))
}
})
// html.nav(class: "panel", {
// let main = query(selector(document).before(<home>)).last()
// link(main.location(), html.span(class: "go-home", main.title))
// })
})
}),
)