docs: rework template and add stages framework

This commit is contained in:
MultisampledNight 2024-01-02 05:03:29 +01:00
commit 3746726245
No known key found for this signature in database
GPG key ID: C81EF9B053977241
5 changed files with 152 additions and 22 deletions

View file

@ -1,12 +1,47 @@
// would also be interesting to try out IBM Plex Mono/Sans sometime
#let atk = "Atkinson Hyperlegible"
#let fonts = (
main: (font: atk, size: 12pt),
title: (font: atk, size: 20pt),
subtitle: (font: atk, size: 10pt),
heading: (font: "Montserrat", weight: "regular"),
)
#let conf(
doc
title: none,
subtitle: none,
doc,
) = {
set text(font: "Atkinson Hyperlegible");
show heading: it => [
#set text(font: "Montserrat", weight: "regular")
set page(
numbering: "1 / 1",
header: locate(loc => {
datetime.today().display()
#it
]
if counter(page).at(loc).first() > 1 {
// on all pages other than the first, the title is useful to have at hand
h(1fr)
title
}
}),
)
set text(..fonts.main)
set heading(numbering: "A.1")
show heading: it => text(..fonts.heading, it)
// document title
if title != none {
align(
right,
text(..fonts.title, title)
+ v(-12pt)
+ text(..fonts.subtitle, subtitle)
)
v(0.25cm)
}
// content itself
doc
}