Typst
This commit is contained in:
31
docs.typ
Normal file
31
docs.typ
Normal file
@@ -0,0 +1,31 @@
|
||||
#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")
|
||||
Reference in New Issue
Block a user