2023-07-10 22:45:59 -04:00
|
|
|
#import "fontawesome.typ": github, fa
|
|
|
|
|
2023-10-21 15:06:08 -04:00
|
|
|
#let DEFAULT_STRONG = 300;
|
|
|
|
#let SMALL_STRONG = 200;
|
2023-07-10 22:45:59 -04:00
|
|
|
|
|
|
|
// Format start and end dates.
|
|
|
|
#let format_date(start_date: none, end_date: none) = {
|
|
|
|
let date = {
|
|
|
|
if end_date == none {
|
|
|
|
start_date
|
|
|
|
} else if start_date == none {
|
|
|
|
end_date
|
|
|
|
} else {
|
|
|
|
[#start_date -- #end_date]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
[*#date*]
|
|
|
|
}
|
|
|
|
|
|
|
|
// Format locations.
|
|
|
|
#let format_location(location) = {
|
2023-07-13 22:13:31 -04:00
|
|
|
[_#block(above: 0.7em, location)_]
|
2023-07-10 22:45:59 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
#let indent(content) = {
|
|
|
|
block(
|
|
|
|
inset: (left: 1em, right: 0.5em),
|
|
|
|
content
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
// General entry that is split into a left and right half (for experience and education).
|
|
|
|
#let cv_entry(left_content: none, right_content: none, details: none) = {
|
|
|
|
stack(
|
|
|
|
dir: ttb,
|
|
|
|
spacing: 0.75em,
|
|
|
|
grid(
|
|
|
|
columns: (11fr, 6fr),
|
|
|
|
column-gutter: 1cm,
|
|
|
|
{
|
|
|
|
set align(left)
|
|
|
|
left_content
|
|
|
|
},
|
|
|
|
{
|
2023-10-21 15:06:08 -04:00
|
|
|
set strong(delta: SMALL_STRONG)
|
2023-07-10 22:45:59 -04:00
|
|
|
set align(right)
|
|
|
|
right_content
|
|
|
|
}
|
|
|
|
),
|
|
|
|
{
|
|
|
|
set align(left)
|
2023-10-21 15:06:08 -04:00
|
|
|
set strong(delta: SMALL_STRONG)
|
2023-07-10 22:45:59 -04:00
|
|
|
details
|
|
|
|
}
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Entry for education.
|
|
|
|
#let education_entry(university, degree, start_date: none, end_date: none, location: none, details: none) = {
|
|
|
|
let details_list = if details != none {
|
|
|
|
let list = []
|
|
|
|
for detail in details {
|
|
|
|
list += [- #detail]
|
|
|
|
}
|
|
|
|
list
|
|
|
|
} else {
|
|
|
|
none
|
|
|
|
}
|
|
|
|
cv_entry(
|
|
|
|
left_content: {
|
2023-10-21 15:06:08 -04:00
|
|
|
set strong(delta: DEFAULT_STRONG)
|
2023-07-10 22:45:59 -04:00
|
|
|
text(1.2em)[*#university*] + "\n" + emph[#degree]
|
|
|
|
},
|
|
|
|
right_content: {
|
|
|
|
format_date(start_date: start_date, end_date: end_date)
|
|
|
|
|
|
|
|
if location != none {
|
|
|
|
"\n" + format_location(location)
|
|
|
|
}
|
|
|
|
},
|
|
|
|
details: details_list
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Entry for work.
|
|
|
|
#let work_entry(role, company, tasks: none, start_date: none, end_date: none, location: none) = {
|
|
|
|
let task_list = if tasks != none {
|
|
|
|
let list = []
|
|
|
|
for task in tasks {
|
|
|
|
list += [- #task]
|
|
|
|
}
|
|
|
|
list
|
|
|
|
} else {
|
|
|
|
none
|
|
|
|
}
|
|
|
|
cv_entry(
|
|
|
|
left_content: {
|
|
|
|
text(1.1em)[*#role*] + "\n" + text[#emph[#company]]
|
|
|
|
},
|
|
|
|
right_content: {
|
|
|
|
format_date(start_date: start_date, end_date: end_date)
|
|
|
|
|
|
|
|
if location != none {
|
|
|
|
"\n" + format_location(location)
|
|
|
|
}
|
|
|
|
},
|
|
|
|
details: task_list
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
#let project(title, repo_link, tools) = {
|
2023-10-21 15:06:08 -04:00
|
|
|
set strong(delta: DEFAULT_STRONG)
|
2023-07-10 22:45:59 -04:00
|
|
|
link(repo_link)[#text(1.1em)[*#title* #fa(github)]] + [ | _ #tools _]
|
|
|
|
}
|
|
|
|
|
|
|
|
// Set name and contact data and format headings
|
|
|
|
#let template(name, contact_data, color, doc) = {
|
2023-10-21 15:06:08 -04:00
|
|
|
let TITLE_FONT = "Bitter"
|
|
|
|
let HEADING_FONT = "Bitter"
|
|
|
|
let BODY_FONT = "Open Sans"
|
2023-07-10 22:45:59 -04:00
|
|
|
set page(margin: (rest: 0.5in, top: 0.4in), paper: "us-letter")
|
|
|
|
set list(indent: 1.25em, marker: [•])
|
2023-10-21 15:06:08 -04:00
|
|
|
set text(font: (BODY_FONT), 10pt)
|
|
|
|
set par(justify: true, leading: 0.85em)
|
2023-07-10 22:45:59 -04:00
|
|
|
align(center)[
|
2023-10-21 15:06:08 -04:00
|
|
|
#text(size: 2em, font: TITLE_FONT, fill: color)[*#name*]
|
2023-07-10 22:45:59 -04:00
|
|
|
#block(above: 0em, below: 1em)
|
|
|
|
#{
|
|
|
|
if contact_data != none and contact_data.len() > 0 {
|
|
|
|
let elements = for el in contact_data {
|
|
|
|
(link(el.link)[#{el.service + " " + el.display}],)
|
|
|
|
}
|
|
|
|
text(1.1em)[#elements.join(" | ")]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
|
|
|
|
show heading.where(level: 1): i => {
|
2023-10-21 15:06:08 -04:00
|
|
|
set align(left + horizon)
|
2023-07-10 22:45:59 -04:00
|
|
|
let title = smallcaps(i.body)
|
2023-10-21 15:06:08 -04:00
|
|
|
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"))
|
|
|
|
})
|
2023-07-10 22:45:59 -04:00
|
|
|
|
2023-10-21 15:06:08 -04:00
|
|
|
// add line to right of heading
|
|
|
|
|
|
|
|
set block(above: 0.9em, below: 0.75em)
|
|
|
|
set text(size: 1em, fill: color, font: HEADING_FONT)
|
2023-07-10 22:45:59 -04:00
|
|
|
stack(
|
2023-10-21 15:06:08 -04:00
|
|
|
dir: ltr,
|
|
|
|
spacing: 3mm,
|
2023-07-10 22:45:59 -04:00
|
|
|
title,
|
2023-10-21 15:06:08 -04:00
|
|
|
box(
|
|
|
|
height: 2pt,
|
|
|
|
fill: color,
|
|
|
|
colored_line(title)
|
|
|
|
)
|
|
|
|
|
2023-07-10 22:45:59 -04:00
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
doc
|
|
|
|
}
|