Make it orange #1

Merged
eggy merged 8 commits from feat/orange into master 2023-10-21 15:06:09 -04:00
Showing only changes of commit 10b693878f - Show all commits

20
lib.typ
View File

@ -116,7 +116,7 @@
// Set name and contact data and format headings // Set name and contact data and format headings
#let template(name, contact_data, color, doc) = { #let template(name, contact_data, color, doc) = {
set page(margin: (rest: 0.5in, top: 0.4in), paper: "us-letter") 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 text(font: ("Latin Modern Sans"), 11pt)
set par(justify: true, leading: 0.65em) set par(justify: true, leading: 0.65em)
align(center)[ align(center)[
@ -133,18 +133,28 @@
] ]
show heading.where(level: 1): i => { show heading.where(level: 1): i => {
set align(left) set align(left + horizon)
let title = smallcaps(i.body) 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 // 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") set text(size: 0.9em, fill: color, font: "Bitter")
stack( stack(
dir: ltr, dir: ltr,
spacing: 2mm, spacing: 3mm,
title, title,
line(length: 100%, stroke: color + 0.4pt), box(
height: 2pt,
fill: color,
colored_line(title)
)
) )
} }