chore: run fmt
This commit is contained in:
89
lib.typ
89
lib.typ
@@ -23,10 +23,7 @@
|
||||
}
|
||||
|
||||
#let indent(content) = {
|
||||
block(
|
||||
inset: (left: 1em, right: 0.5em),
|
||||
content
|
||||
)
|
||||
block(inset: (left: 1em, right: 0.5em), content)
|
||||
}
|
||||
|
||||
// General entry that is split into a left and right half (for experience and education).
|
||||
@@ -34,30 +31,32 @@
|
||||
stack(
|
||||
dir: ttb,
|
||||
spacing: 0.9em,
|
||||
grid(
|
||||
columns: (11fr, 6fr),
|
||||
column-gutter: 1cm,
|
||||
{
|
||||
grid(columns: (11fr, 6fr), column-gutter: 1cm, {
|
||||
set strong(delta: DEFAULT_STRONG)
|
||||
set align(left)
|
||||
left_content
|
||||
},
|
||||
{
|
||||
}, {
|
||||
set strong(delta: SMALL_STRONG)
|
||||
set align(right)
|
||||
right_content
|
||||
}
|
||||
),
|
||||
{
|
||||
set align(left)
|
||||
set strong(delta: SMALL_STRONG)
|
||||
details
|
||||
}
|
||||
)
|
||||
}),
|
||||
{
|
||||
set align(left)
|
||||
set strong(delta: SMALL_STRONG)
|
||||
details
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
// Entry for work.
|
||||
#let work_entry(role, company, tasks: none, start_date: none, end_date: none, location: none) = {
|
||||
#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 {
|
||||
@@ -67,31 +66,27 @@
|
||||
} else {
|
||||
none
|
||||
}
|
||||
cv_entry(
|
||||
left_content: {
|
||||
text(1.1em)[*#role*] + "\n" + text[#emph[#company]]
|
||||
},
|
||||
right_content: {
|
||||
[*#start_date -- #end_date*]
|
||||
cv_entry(left_content: {
|
||||
text(1.1em)[*#role*] + "\n" + text[#emph[#company]]
|
||||
}, right_content: {
|
||||
[*#start_date -- #end_date*]
|
||||
|
||||
if location != none {
|
||||
"\n" + format_location(location)
|
||||
}
|
||||
},
|
||||
details: task_list
|
||||
)
|
||||
if location != none {
|
||||
"\n" + format_location(location)
|
||||
}
|
||||
}, details: task_list)
|
||||
}
|
||||
|
||||
#let project(title, repo_link, tools) = {
|
||||
set strong(delta: DEFAULT_STRONG)
|
||||
link(repo_link)[#text(1.1em)[*#title* #fa(github)]] + [ | _ #tools _]
|
||||
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) = {
|
||||
set page(margin: PAGE_MARGINS, paper: "us-letter")
|
||||
set list(indent: 1.25em, marker: [•])
|
||||
set text(font: (BODY_FONT), BODY_FONT_SIZE)
|
||||
set text(font: (BODY_FONT), BODY_FONT_SIZE)
|
||||
set par(justify: true, leading: BODY_LINE_HEIGHT)
|
||||
align(center)[
|
||||
#text(size: TITLE_FONT_SIZE, font: TITLE_FONT, fill: color)[*#name*]
|
||||
@@ -99,7 +94,7 @@
|
||||
#{
|
||||
if contact_data != none and contact_data.len() > 0 {
|
||||
let elements = for el in contact_data {
|
||||
(link(el.link)[#{el.service + " " + el.display}],)
|
||||
(link(el.link)[#{ el.service + " " + el.display }],)
|
||||
}
|
||||
text(1.1em)[#elements.join(" | ")]
|
||||
}
|
||||
@@ -111,24 +106,22 @@
|
||||
let title = smallcaps(i.body)
|
||||
|
||||
let colored_line(header_text) = style(styles => {
|
||||
let size = measure(header_text, styles)
|
||||
let size = measure(header_text, styles)
|
||||
|
||||
// 100% - spacing - width of text
|
||||
line(length: 100% - HEADING_LINE_GAP - size.width, stroke: (paint: color, thickness: 2pt, cap: "round"))
|
||||
// 100% - spacing - width of text
|
||||
line(
|
||||
length: 100% - HEADING_LINE_GAP - size.width,
|
||||
stroke: (paint: color, thickness: 2pt, cap: "round"),
|
||||
)
|
||||
})
|
||||
|
||||
set block(above: 0.9em, below: 0.75em)
|
||||
set text(size: 1em, fill: color, font: HEADING_FONT)
|
||||
stack(
|
||||
dir: ltr,
|
||||
spacing: HEADING_LINE_GAP,
|
||||
title,
|
||||
box(
|
||||
height: 2pt,
|
||||
fill: color,
|
||||
colored_line(title)
|
||||
)
|
||||
|
||||
set text(size: 1em, fill: color, font: HEADING_FONT)
|
||||
stack(
|
||||
dir: ltr,
|
||||
spacing: HEADING_LINE_GAP,
|
||||
title,
|
||||
box(height: 2pt, fill: color, colored_line(title)),
|
||||
)
|
||||
}
|
||||
doc
|
||||
|
Reference in New Issue
Block a user