2023-12-13 21:58:12 -05:00
|
|
|
#import "fontawesome.typ": github, fa, link-icon
|
2023-07-10 22:45:59 -04:00
|
|
|
|
2023-10-21 15:06:08 -04:00
|
|
|
#let DEFAULT_STRONG = 300;
|
|
|
|
#let SMALL_STRONG = 200;
|
2023-07-10 22:45:59 -04:00
|
|
|
|
2024-06-17 23:30:08 -04:00
|
|
|
#let TITLE_FONT = "Bitter"
|
2023-10-21 22:27:41 -04:00
|
|
|
#let HEADING_FONT = TITLE_FONT
|
2024-06-24 23:42:50 -04:00
|
|
|
#let BODY_FONT = "Open Sans"
|
2023-10-21 22:27:41 -04:00
|
|
|
|
2024-06-24 23:42:50 -04:00
|
|
|
#let BODY_FONT_SIZE = 10pt
|
|
|
|
#let HEADING_FONT_SIZE = 0.95em
|
|
|
|
#let TITLE_FONT_SIZE = 2em
|
2023-10-21 22:27:41 -04:00
|
|
|
|
|
|
|
#let HEADING_LINE_GAP = 3mm
|
2024-06-24 23:42:50 -04:00
|
|
|
#let BODY_LINE_HEIGHT = 0.75em
|
2024-06-17 23:30:08 -04:00
|
|
|
|
2024-06-24 23:42:50 -04:00
|
|
|
#let HEADING_DETAILS_LIST_SPACING = 0.9em
|
|
|
|
#let DETAILS_TITLE_FONT_SIZE = 1.075em
|
2024-06-17 23:30:08 -04:00
|
|
|
|
2024-06-24 23:42:50 -04:00
|
|
|
#let DETAILS_LIST_SPACING = 0.85em
|
2023-10-21 22:27:41 -04:00
|
|
|
|
|
|
|
// rest = not top
|
2024-06-24 23:42:50 -04:00
|
|
|
#let PAGE_MARGINS = (right: 0.45in, left: 0.4in, rest: 0.4in)
|
2023-10-21 22:27:41 -04:00
|
|
|
|
2023-07-10 22:45:59 -04:00
|
|
|
// 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) = {
|
2024-06-24 23:42:50 -04:00
|
|
|
block(inset: (left: 0.75em, right: 1em), content)
|
2023-07-10 22:45:59 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// 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,
|
2024-06-17 23:30:08 -04:00
|
|
|
spacing: HEADING_DETAILS_LIST_SPACING,
|
2024-06-24 23:42:50 -04:00
|
|
|
grid(columns: (15fr, 4fr), column-gutter: 0cm, {
|
2023-10-21 22:36:52 -04:00
|
|
|
set strong(delta: DEFAULT_STRONG)
|
2023-07-10 22:45:59 -04:00
|
|
|
set align(left)
|
|
|
|
left_content
|
2023-10-25 21:00:11 -04:00
|
|
|
}, {
|
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
|
2023-10-25 21:00:11 -04:00
|
|
|
}),
|
|
|
|
{
|
2024-06-18 00:02:00 -04:00
|
|
|
set strong(delta: DEFAULT_STRONG)
|
2024-06-17 23:30:08 -04:00
|
|
|
list(tight: false, spacing: DETAILS_LIST_SPACING, marker: [•], ..details)
|
2023-10-25 21:00:11 -04:00
|
|
|
},
|
|
|
|
)
|
2023-07-10 22:45:59 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// Entry for work.
|
2023-10-25 21:00:11 -04:00
|
|
|
#let work_entry(
|
|
|
|
role,
|
|
|
|
company,
|
2023-12-13 21:58:12 -05:00
|
|
|
tools: none,
|
2023-10-25 21:00:11 -04:00
|
|
|
tasks: none,
|
|
|
|
start_date: none,
|
|
|
|
end_date: none,
|
|
|
|
location: none,
|
|
|
|
) = {
|
|
|
|
cv_entry(left_content: {
|
2024-06-13 23:20:49 -04:00
|
|
|
set par(justify: true)
|
2024-06-17 23:30:08 -04:00
|
|
|
text(DETAILS_TITLE_FONT_SIZE)[*#company* | _#role _]
|
|
|
|
|
|
|
|
if tools != none {
|
2024-06-24 23:42:50 -04:00
|
|
|
set strong(delta: SMALL_STRONG)
|
2024-06-18 00:03:43 -04:00
|
|
|
text[ | *#tools* ]
|
2024-06-17 23:30:08 -04:00
|
|
|
}
|
2023-10-25 21:00:11 -04:00
|
|
|
}, right_content: {
|
2024-06-17 23:30:08 -04:00
|
|
|
[_#start_date -- #end_date _]
|
2024-06-13 23:05:13 -04:00
|
|
|
// if location != none {
|
|
|
|
// format_location(location)
|
|
|
|
// }
|
2024-06-17 23:30:08 -04:00
|
|
|
}, details: tasks)
|
2023-07-10 22:45:59 -04:00
|
|
|
}
|
|
|
|
|
2024-06-24 22:26:57 -04:00
|
|
|
#let project(
|
|
|
|
title,
|
|
|
|
tools,
|
|
|
|
start_date: none,
|
|
|
|
end_date: none,
|
|
|
|
repo_link: none,
|
|
|
|
demo_link: none,
|
|
|
|
tasks: none,
|
|
|
|
) = {
|
2023-10-21 15:06:08 -04:00
|
|
|
set strong(delta: DEFAULT_STRONG)
|
2023-12-13 21:58:12 -05:00
|
|
|
let text_link = if demo_link != none { demo_link } else { repo_link }
|
2024-06-24 22:26:57 -04:00
|
|
|
let date_content = if start_date != none {
|
|
|
|
[_#start_date -- #end_date _]
|
|
|
|
} else {
|
|
|
|
none
|
|
|
|
}
|
2023-12-13 21:58:12 -05:00
|
|
|
|
2024-06-18 00:02:00 -04:00
|
|
|
let content_title = {
|
2024-06-18 00:05:04 -04:00
|
|
|
set text(size: DETAILS_TITLE_FONT_SIZE)
|
2024-06-18 00:02:00 -04:00
|
|
|
if text_link != none {
|
|
|
|
link(text_link)[#text[*#title*]]
|
|
|
|
} else {
|
|
|
|
text[*#title*]
|
|
|
|
}
|
2023-12-13 21:58:12 -05:00
|
|
|
|
2024-06-18 00:02:00 -04:00
|
|
|
if demo_link != none {
|
|
|
|
link(demo_link)[ #fa(link-icon) ]
|
|
|
|
}
|
|
|
|
|
|
|
|
if repo_link != none {
|
|
|
|
link(repo_link)[ #fa(github) ]
|
|
|
|
}
|
|
|
|
[ | _ #tools _ ]
|
2023-11-01 13:13:24 -04:00
|
|
|
}
|
2024-06-18 00:02:00 -04:00
|
|
|
|
2024-06-24 22:26:57 -04:00
|
|
|
cv_entry(
|
|
|
|
left_content: content_title,
|
|
|
|
right_content: date_content,
|
|
|
|
details: tasks,
|
|
|
|
)
|
2023-07-10 22:45:59 -04:00
|
|
|
}
|
|
|
|
|
2024-05-26 15:51:40 -04:00
|
|
|
#let render_contact_data(data) = {
|
|
|
|
align(center)[
|
|
|
|
#let elements = for el in data {
|
|
|
|
(link(el.link)[#{ el.service + " " + el.display }],)
|
|
|
|
}
|
|
|
|
#text(1em)[#elements.join(" | ")]
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2023-07-10 22:45:59 -04:00
|
|
|
// Set name and contact data and format headings
|
2024-05-26 15:51:40 -04:00
|
|
|
#let template(name, color, doc) = {
|
2023-10-21 22:27:41 -04:00
|
|
|
set page(margin: PAGE_MARGINS, paper: "us-letter")
|
2024-06-18 00:02:00 -04:00
|
|
|
set list(indent: 0.75em, marker: [•])
|
2023-10-25 21:00:11 -04:00
|
|
|
set text(font: (BODY_FONT), BODY_FONT_SIZE)
|
2024-06-13 23:05:13 -04:00
|
|
|
set par(leading: BODY_LINE_HEIGHT)
|
2023-07-10 22:45:59 -04:00
|
|
|
align(center)[
|
2024-06-17 23:30:08 -04:00
|
|
|
#text(size: TITLE_FONT_SIZE, font: TITLE_FONT, fill: color)[*#name*]
|
2023-07-10 22:45:59 -04:00
|
|
|
#block(above: 0em, below: 1em)
|
|
|
|
]
|
|
|
|
|
|
|
|
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 22:36:52 -04:00
|
|
|
|
2023-10-21 15:06:08 -04:00
|
|
|
let colored_line(header_text) = style(styles => {
|
2023-10-25 21:00:11 -04:00
|
|
|
let size = measure(header_text, styles)
|
2023-10-21 15:06:08 -04:00
|
|
|
|
2023-10-25 21:00:11 -04:00
|
|
|
// 100% - spacing - width of text
|
|
|
|
line(
|
|
|
|
length: 100% - HEADING_LINE_GAP - size.width,
|
|
|
|
stroke: (paint: color, thickness: 2pt, cap: "round"),
|
|
|
|
)
|
2023-10-21 15:06:08 -04:00
|
|
|
})
|
2023-07-10 22:45:59 -04:00
|
|
|
|
2023-10-21 15:06:08 -04:00
|
|
|
set block(above: 0.9em, below: 0.75em)
|
2023-12-12 23:19:27 -05:00
|
|
|
set text(size: HEADING_FONT_SIZE, fill: color, font: HEADING_FONT)
|
2023-10-25 21:00:11 -04:00
|
|
|
stack(
|
|
|
|
dir: ltr,
|
|
|
|
spacing: HEADING_LINE_GAP,
|
|
|
|
title,
|
|
|
|
box(height: 2pt, fill: color, colored_line(title)),
|
2023-07-10 22:45:59 -04:00
|
|
|
)
|
|
|
|
}
|
|
|
|
doc
|
|
|
|
}
|