32 lines
846 B
Typst
32 lines
846 B
Typst
#import "/static/index.typ": stylesheets
|
|
|
|
#let docs-page(title: none, route: none, content) = {
|
|
document(
|
|
route + "index.html",
|
|
title: title,
|
|
html.html({
|
|
html.head({
|
|
html.meta(charset: "utf-8")
|
|
html.meta(name: "viewport", content: "width=device-width, initial-scale=1")
|
|
html.meta(name: "color-scheme", content: "dark light")
|
|
for stylesheet in stylesheets {
|
|
html.link(rel: "stylesheet", href: stylesheet)
|
|
}
|
|
html.title(context title)
|
|
})
|
|
html.body({
|
|
html.header({
|
|
html.h1(context title)
|
|
})
|
|
html.main(content)
|
|
})
|
|
}),
|
|
)
|
|
}
|
|
|
|
#let callout(kind: str, body) = html.div(class: "callout " + kind, body)
|
|
|
|
#let note = callout.with(kind: "note")
|
|
#let warn = callout.with(kind: "caution")
|
|
#let tip = callout.with(kind: "tip")
|