feat: chris
This commit is contained in:
84
lib.typ
84
lib.typ
@@ -3,11 +3,11 @@
|
||||
#let DEFAULT_STRONG = 300;
|
||||
#let SMALL_STRONG = 200;
|
||||
|
||||
#let TITLE_FONT = "Bitter"
|
||||
#let TITLE_FONT = "Calibri"
|
||||
#let HEADING_FONT = TITLE_FONT
|
||||
#let BODY_FONT = "Open Sans"
|
||||
#let BODY_FONT = "Calibri"
|
||||
|
||||
#let BODY_FONT_SIZE = 10pt
|
||||
#let BODY_FONT_SIZE = 11pt
|
||||
#let HEADING_FONT_SIZE = 1em
|
||||
#let TITLE_FONT_SIZE = 2em
|
||||
|
||||
@@ -15,12 +15,7 @@
|
||||
#let BODY_LINE_HEIGHT = 0.85em
|
||||
|
||||
// rest = not top
|
||||
#let PAGE_MARGINS = (rest: 0.5in, top: 0.4in)
|
||||
|
||||
// Format locations.
|
||||
#let format_location(location) = {
|
||||
[_#block(above: 0.7em, location)_]
|
||||
}
|
||||
#let PAGE_MARGINS = (rest: 0.3in, top: 0.3in)
|
||||
|
||||
#let indent(content) = {
|
||||
block(
|
||||
@@ -35,18 +30,18 @@
|
||||
dir: ttb,
|
||||
spacing: 0.9em,
|
||||
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
|
||||
}
|
||||
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)
|
||||
@@ -57,7 +52,7 @@
|
||||
}
|
||||
|
||||
// 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, one_line: true) = {
|
||||
let task_list = if tasks != none {
|
||||
let list = []
|
||||
for task in tasks {
|
||||
@@ -69,14 +64,15 @@
|
||||
}
|
||||
cv_entry(
|
||||
left_content: {
|
||||
text(1.1em)[*#role*] + "\n" + text[#emph[#company]]
|
||||
text(1.1em)[*#role* | ]
|
||||
text[#emph[#company]]
|
||||
if location != none {
|
||||
text[_, #location _]
|
||||
}
|
||||
},
|
||||
right_content: {
|
||||
[*#start_date -- #end_date*]
|
||||
|
||||
if location != none {
|
||||
"\n" + format_location(location)
|
||||
}
|
||||
},
|
||||
details: task_list
|
||||
)
|
||||
@@ -87,24 +83,28 @@
|
||||
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 par(justify: true, leading: BODY_LINE_HEIGHT)
|
||||
align(center)[
|
||||
#text(size: TITLE_FONT_SIZE, font: TITLE_FONT, fill: color)[*#name*]
|
||||
#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}],)
|
||||
|
||||
let header = {
|
||||
align(center)[
|
||||
#text(size: TITLE_FONT_SIZE, font: TITLE_FONT, fill: color)[*#name*]
|
||||
#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(" | ")]
|
||||
}
|
||||
text(1.1em)[#elements.join(" | ")]
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
|
||||
show heading.where(level: 1): i => {
|
||||
set align(left + horizon)
|
||||
@@ -125,11 +125,17 @@
|
||||
title,
|
||||
box(
|
||||
height: 2pt,
|
||||
fill: color,
|
||||
colored_line(title)
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
}
|
||||
doc
|
||||
block(
|
||||
stroke: (paint: color, thickness: 4pt),
|
||||
inset: 1.5em,
|
||||
{
|
||||
header
|
||||
doc
|
||||
}
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user