feat(finely-crafte-cv): make icon header user defineable

This commit is contained in:
swaits committed 2025-01-26 12:56:09 -07:00
1 parent 57c961dd18
commit 081b821457
23 files changed
+459 -39

No files matched your search

+24 -10
View File
@@ -1,18 +1,32 @@
#import "constants.typ":*
#let icon_and_contact(icon, content) = {
grid(
columns: 2,
align: center+horizon,
gutter: COMPANY_ICON_SPACING,
if icon != none and content != none {
grid(
columns: 2,
align: center+horizon,
gutter: COMPANY_ICON_SPACING,
box(
height: HEADER_ICON_HEIGHT,
width: auto,
icon
),
content
)
}
}
#let make-icon-header(icon-tuples) = {
// what we put between elements
let icon-joiner = box(baseline: -0.15em, [#h(0.5em)#sym.divides#h(0.5em)])
// map them into formatted content, and join
icon-tuples.map(((icon, content)) => {
box(
height: HEADER_ICON_HEIGHT,
width: auto,
image(icon)
),
content
)
icon_and_contact(icon, content)
)
}).join(icon-joiner)
}
#let hrule(stroke: 1pt + black) = {