cute nav buttons

This commit is contained in:
David Allemang
2026-07-31 03:45:39 -07:00
parent 75a3d25bc8
commit e0b0120cf6
2 changed files with 55 additions and 6 deletions

View File

@@ -13,7 +13,29 @@
html.link(rel: "stylesheet", href: "/src/components.css")
html.script(type: "module", src: "/src/components.js")
})
html.body(it)
html.body(context {
let prev = query(selector(heading.where(level: 1)).before(here())).at(-1, default: none)
let next = query(selector(heading.where(level: 1)).after(here())).at(1, default: none)
html.main(it)
html.footer({
html.nav({
html.ul({
if prev != none {
html.li(
link(prev.location(), [Prev: #prev.body]),
class: "btn",
)
}
if next != none {
html.li(
link(next.location(), [Next: #next.body]),
class: "btn",
)
}
})
})
})
})
},
))
@@ -24,7 +46,7 @@
doc("interference.html", include "content/interference.typ")
doc("tilesets.html", include "content/tilesets.typ")
doc("block-event-delay.html", include "content/block-event-delay.typ")
// doc("design-notes.html", include "content/design.typ")
// doc("design-notfirstes.html", include "content/design.typ")
// doc("channel-selectors.html", include "content/channels.typ")
// doc("bulk-transmission.html", include "content/bulk.typ")
// doc("network-protocols.html", include "content/network.typ")