working on toc
This commit is contained in:
25
docs.typ
25
docs.typ
@@ -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))
|
||||
// })
|
||||
})
|
||||
}),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user