feat: abstract everything

This commit is contained in:
eggy
2025-01-07 15:19:53 -05:00
parent 1d3c065bf7
commit 7090fbbed0
3 changed files with 63 additions and 46 deletions

View File

@@ -127,15 +127,15 @@
set align(left + horizon)
let title = smallcaps(i.body)
let colored_line(header_text) = style(styles => {
let size = measure(header_text, styles)
let colored_line(header_text) = {
let size = measure(header_text)
// 100% - spacing - width of text
line(
length: 100% - HEADING_LINE_GAP - size.width,
stroke: (paint: color, thickness: 2pt, cap: "round"),
)
})
}
set block(above: 0.9em, below: 0.75em)
set text(size: HEADING_FONT_SIZE, fill: color, font: HEADING_FONT)