Files
cv/helpers.typ
2026-05-16 09:50:09 +02:00

68 lines
2.0 KiB
Typst

#let FeatureColor = rgb("292929")
#let BackgroundColor = rgb("#fcfcfc")
#let font = "Helvetica"
#let titlefont = "Libre Caslon Display"
#let textfont = "Libre Caslon Text"
#import "@preview/cades:0.3.1": qr-code
#let section2(body, topspace: 35pt) = {
v(topspace)
grid(
columns: (1fr, auto, 1fr),
column-gutter: 5pt,
[#v(5pt) #line(length: 100%)], [#text(size: 16pt, font: titlefont, body)],[#v(5pt) #line(length: 100%)]
)
}
#let section2danish(body, topspace: 28pt) = section2(topspace: topspace, body)
#let blob(inverse: false, body) = {
set text(size: 10pt)
if inverse {
box(stroke: (FeatureColor +1pt), radius: 8pt, outset: (top:4pt, bottom: 4pt))[#h(4pt) #text(body) #h(4pt)]
} else {
box(fill: FeatureColor, radius: 8pt, outset: (top:4pt, bottom: 4pt))[#h(4pt) #text(fill: white,body) #h(4pt)]
}
}
#let section3(body, topspace: 13pt) = {
v(topspace)
text(size:16pt, weight: 800, font: titlefont)[#body]
}
#let section3danish(body) = section3(topspace: 5pt, body)
#let progress(Number)= {
rect(width: 100%, height: 8pt, stroke: FeatureColor, fill: FeatureColor, inset: 0pt)[
#align(end)[#rect(width: (1%*(100-Number)), height: 8pt, fill: BackgroundColor)]
]
}
#let QR-stack() = {
grid(
columns: (1fr, 1fr),
[#align(start)[
#block(width: 60pt)[
#stack(spacing: 5pt)[
#align(center)[#text(size: 10pt)[Website]]
][
#qr-code(error-correction: "H", "samantha42.xyz", color: FeatureColor, width: 60pt)
#place(center + horizon)[#block(fill: white, width: 15pt, height: 15pt)[#image("Assets/www.svg")]]
]]]],
[#align(end)[
#block(width: 60pt)[
#stack(spacing: 5pt)[
#align(center)[#text(size: 10pt)[Repository]]
][
#qr-code(error-correction: "H", "git.samantha42.xyz", color: FeatureColor, width: 60pt)
#place(center + horizon)[#block(fill: white, width: 15pt, height: 15pt)[#image("Assets/repository.svg")]]
]]]],
)
}