resume/cv.typ

180 lines
4.2 KiB
Text
Raw Normal View History

2024-09-14 20:13:34 +00:00
#show heading: set text(font: "New Computer Modern")
#show link: underline
// smartypants and latex compatibility
#show "--": [#sym.dash.en]
#show "---": [#sym.dash.em]
#show "\&": [#sym.amp]
2024-09-14 20:13:34 +00:00
// Choose the compiled language through cli by doing
//
// $ typst compile --input lang=de cv.typ
//
#let lang = {
if "lang" in sys.inputs and sys.inputs.lang == "de" {
"de"
} else {
"en"
}
}
#let _columns_3(left_body, center_body, right_body) = {
block[
#box(width: 1fr)[
#align(left)[#left_body]
]
#box(width: 1fr)[
#align(center)[#center_body]
]
#box(width: 1fr)[
#align(right)[#right_body]
]
]
}
2024-09-14 20:13:34 +00:00
// Feel free to change the margin below to best fit your own CV
#set page(
paper: "a4",
margin: (x: 0.9cm, y: 1.3cm),
footer: [
#set text(
fill: luma(200),
size: 8pt,
)
#_columns_3[
#smallcaps[#datetime.today().display("[month repr:long] [day], [year]")]
][
#smallcaps[
Marty Oehme
// #sym.dot.c
// CV
]
][
#counter(page).display()
]
],
2024-09-14 20:13:34 +00:00
)
#set par(justify: true)
#let header(about, columns: (1.5fr, 1fr, 1fr)) = {
[= #about.fullname];
let contact_fields = (for c in about.contact {
if "link" in c {
([#c.icon ~ #link(c.link)[#c.text]],)
} else {
([#c.icon ~ #c.text],)
}
})
grid(
columns: columns,
gutter: 5pt,
..contact_fields
);
}
2024-09-14 20:13:34 +00:00
#let horizon_line() = {v(-3pt); line(length: 100%); v(-5pt)}
#let section_header(title) = {[== #title]; horizon_line()};
#let section(title: "Section", body) = {
section_header(title);
body
};
#let work_item(item: ()) = {
if "client" in item {
[*#item.title.at(lang)*, _#item.client.at(lang)_ #h(1fr)];
} else {
[*#item.title.at(lang)* #h(1fr)];
};
[ _#item.date.at(lang)_ \ ];
if "bullets" in item {
for bullet in item.bullets {
[- #bullet.at(lang)]
}
}
if "publication" in item {
block(inset: 5%, width: 85%, text(fill:luma(150))[#item.publication.at(lang) \ ])
};
}
#let education_item(item: ()) = {
assert("place" in item and "program" in item and "date" in item, message: "Education items require place, program and date.");
[*#item.place.at(lang)*, #item.program.at(lang) #h(1fr)];
[ _#item.date.at(lang)_ \ ];
}
#let thesis_item(item: ()) = {
assert("type" in item and "title" in item, message: "Thesis items require type and title.");
[*#item.type.at(lang)* #item.title.at(lang) #h(1fr)];
[#par(item.abstract.at(lang))]
}
#let sel_word_lang(de: "", en:"") = {
if lang == "de" {
de
} else {
en
}
}
2024-09-14 20:13:34 +00:00
#let skill_item(item: ()) = {
[*#item.at(lang)*: \ ]
for skill in item.content {
[#skill.name.at(lang) (]
for (i, v) in skill.items.enumerate() {
[#v.at(lang)]
if i < skill.items.len() - 1 {
[, ]
}
}
[) \ ]
}
}
2024-09-14 20:13:34 +00:00
#let resume(contents) = {
header(contents.about)
2024-09-14 20:13:34 +00:00
if "summary" in contents {
section(title:"", {
2024-09-14 20:13:34 +00:00
contents.summary.at(lang)
})
};
2024-09-14 20:13:34 +00:00
if "experience" in contents {
let title = sel_word_lang(en:"Professional Experience", de:"Berufserfahrung")
section(title: title, {
2024-09-14 20:13:34 +00:00
for entry in contents.experience {
work_item(item:entry)
}
})
}
if "education" in contents {
let title = sel_word_lang(en:"Education", de:"Ausbildung")
section(title: "Education", {
2024-09-14 20:13:34 +00:00
for entry in contents.thesis {
thesis_item(item:entry)
}
for entry in contents.education {
education_item(item:entry)
}
})
}
if "skills" in contents {
let title = sel_word_lang(en:"Qualifications", de:"Qualifikationen")
section(title: "Qualifications", {
2024-09-14 20:13:34 +00:00
for cat in contents.skills {
skill_item(item:cat)
}
})
}
}
#resume(
yaml("content.yml")
)