feat: orange complete

This commit is contained in:
eggy 2023-10-21 00:53:17 -04:00
parent 9676cd0d4d
commit 10b693878f

20
lib.typ
View File

@ -116,7 +116,7 @@
// Set name and contact data and format headings
#let template(name, contact_data, color, doc) = {
set page(margin: (rest: 0.5in, top: 0.4in), paper: "us-letter")
set list(indent: 1.25em, marker: [•])
set list(indent: 1.25em)
set text(font: ("Latin Modern Sans"), 11pt)
set par(justify: true, leading: 0.65em)
align(center)[
@ -133,18 +133,28 @@
]
show heading.where(level: 1): i => {
set align(left)
set align(left + horizon)
let title = smallcaps(i.body)
let colored_line(header_text) = style(styles => {
let size = measure(header_text, styles)
// 100% - spacing - width of text
line(length: 100% - 3mm - size.width, stroke: (paint: color, thickness: 2pt, cap: "round"))
})
// add line to right of heading
set block(above: 1em, below: 1em)
set block(above: 1em, below: 0.75em)
set text(size: 0.9em, fill: color, font: "Bitter")
stack(
dir: ltr,
spacing: 2mm,
spacing: 3mm,
title,
line(length: 100%, stroke: color + 0.4pt),
box(
height: 2pt,
fill: color,
colored_line(title)
)
)
}