diff options
| author | Kleidi Bujari <mail@4kb.net> | 2024-12-17 23:03:27 -0500 |
|---|---|---|
| committer | Kleidi Bujari <mail@4kb.net> | 2024-12-17 23:03:27 -0500 |
| commit | eb13a9a552f9e50a66faba985521ba8e3483c447 (patch) | |
| tree | 209193a91b0db20fb1bb30007e72e321f0293696 /mod/misc/cv/template.typ | |
| parent | f5ed731abbc38d765333b005b9815a5f6d3e59c2 (diff) | |
| download | depot-eb13a9a552f9e50a66faba985521ba8e3483c447.tar.gz depot-eb13a9a552f9e50a66faba985521ba8e3483c447.tar.bz2 depot-eb13a9a552f9e50a66faba985521ba8e3483c447.zip | |
Push configuration out of flake
Projects are not necessarily all exported by the system flake, and
should freely support other derivations. The new "mod" directory will be
used for most projects, and it can be imported by machine
configurations.
That said, the tooling around flakes is pretty good and will still be
used until the dependency is lessened.
Diffstat (limited to 'mod/misc/cv/template.typ')
| -rw-r--r-- | mod/misc/cv/template.typ | 211 |
1 files changed, 211 insertions, 0 deletions
diff --git a/mod/misc/cv/template.typ b/mod/misc/cv/template.typ new file mode 100644 index 0000000..4b07fba --- /dev/null +++ b/mod/misc/cv/template.typ @@ -0,0 +1,211 @@ +#let resume( + author: "", + pronouns: "", + location: "", + email: "", + github: "", + linkedin: "", + phone: "", + personal-site: "", + accent-color: "#000000", + font: "New Computer Modern", + paper: "us-letter", + body, +) = { + + // Sets document metadata + set document(author: author, title: author) + + // Document-wide formatting, including font and margins + set text( + // LaTeX style font + font: font, + size: 10pt, + lang: "en", + // Disable ligatures so ATS systems do not get confused when parsing fonts. + ligatures: false + ) + + // Reccomended to have 0.5in margin on all sides + set page( + margin: (0.5in), + paper: paper, + ) + + // Link styles + show link: underline + + + // Small caps for section titles + show heading.where(level: 2): it => [ + #pad(top: 0pt, bottom: -10pt, [#smallcaps(it.body)]) + #line(length: 100%, stroke: 1pt) + ] + + // Accent Color Styling + show heading: set text( + fill: rgb(accent-color), + ) + + show link: set text( + fill: rgb(accent-color), + ) + + // Name will be aligned left, bold and big + show heading.where(level: 1): it => [ + #set align(left) + #set text( + weight: 700, + size: 20pt, + ) + #pad(it.body) + ] + + // Level 1 Heading + [= #(author)] + + // Personal Info Helper + let contact-item(value, prefix: "", link-type: "") = { + if value != "" { + if link-type != "" { + link(link-type + value)[#(prefix + value)] + } else { + value + } + } + } + + // Personal Info + pad( + top: 0.25em, + align(left)[ + #{ + let items = ( + contact-item(pronouns), + contact-item(phone), + contact-item(location), + contact-item(email, link-type: "mailto:"), + contact-item(github, link-type: "https://"), + contact-item(linkedin, link-type: "https://"), + contact-item(personal-site, link-type: "https://"), + ) + items.filter(x => x != none).join(" | ") + } + ], + ) + + // Main body. + set par(justify: true) + + body +} + +// Generic two by two component for resume +#let generic-two-by-two( + top-left: "", + top-right: "", + bottom-left: "", + bottom-right: "", +) = { + [ + #top-left #h(1fr) #top-right \ + #bottom-left #h(1fr) #bottom-right + ] +} + +// Generic one by two component for resume +#let generic-one-by-two( + left: "", + right: "", +) = { + [ + #left #h(1fr) #right + ] +} + +// Cannot just use normal --- ligature becuase ligatures are disabled for good reasons +#let dates-helper( + start-date: "", + end-date: "", +) = { + start-date + " " + $dash.em$ + " " + end-date +} + +// Section components below +#let edu( + institution: "", + dates: "", + degree: "", + gpa: "", + location: "", +) = { + generic-two-by-two( + top-left: strong(institution), + top-right: location, + bottom-left: emph(degree), + bottom-right: emph(dates), + ) +} + +#let work( + title: "", + dates: "", + company: "", + location: "", +) = { + generic-two-by-two( + top-left: strong(title), + top-right: dates, + bottom-left: company, + bottom-right: emph(location), + ) +} + +#let project( + role: "", + name: "", + url: "", + dates: "", +) = { + generic-one-by-two( + left: { + if role == "" { + [*#name* #if url != "" and dates != "" [ (#link("https://" + url)[#url])]] + } else { + [*#role*, #name #if url != "" and dates != "" [ (#link("https://" + url)[#url])]] + } + }, + right: { + if dates == "" and url != "" { + link("https://" + url)[#url] + } else { + dates + } + }, + ) +} + +#let certificates( + name: "", + issuer: "", + url: "", + date: "", +) = { + [ + *#name*, #issuer + #if url != "" { + [ (#link("https://" + url)[#url])] + } + #h(1fr) #date + ] +} + +#let extracurriculars( + activity: "", + dates: "", +) = { + generic-one-by-two( + left: strong(activity), + right: dates, + ) +} |
