From 10b693878f2ba868f42da4ffcb03356499366808 Mon Sep 17 00:00:00 2001 From: eggy Date: Sat, 21 Oct 2023 00:53:17 -0400 Subject: [PATCH] feat: orange complete --- lib.typ | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/lib.typ b/lib.typ index e23e694..4edd174 100644 --- a/lib.typ +++ b/lib.typ @@ -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) + ) ) }