Bauke/cv
Bauke
/
cv
1
Fork 0

Add the main Typst entrypoint.

This commit is contained in:
Bauke 2024-01-20 17:44:14 +01:00
parent e58397a59f
commit 79c79d647a
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
1 changed files with 47 additions and 0 deletions

47
main.typ Normal file
View File

@ -0,0 +1,47 @@
#import "./components/experience.typ": experience_section
#import "./components/personal-projects.typ": personal_projects_section
#import "./components/skills.typ": skills_section
#import "./components/header.typ": header
#import "./utilities/content-to-string.typ": content_to_string
#let cv(include_links: true, language: "") = {
if language == "" {
panic("No language option specified.")
}
let data = toml("data/info.toml")
set document(
author: data.name,
title: content_to_string([CV #data.name (#language)]),
)
set text(font: "Inter", lang: language, size: 12pt)
// The links color and styling has to be done this way because the `show`
// keyword only applies to the scope of the block it is in. Meaning it won't
// apply globally when put inside the `if` block.
let links = if include_links {
(color: rgb("#000080"), style: underline)
} else {
(color: black, style: (body) => body)
}
show link: set text(links.color)
show link: links.style
header(data, language, include_links)
// Portion out the main body using a grid.
grid(
columns: (60%, 40%),
gutter: 1.5em,
// Place the Experience and Personal Projects sections vertically in the
// left column of the grid.
{
experience_section(data, language)
personal_projects_section(data, language)
},
// And the Skills section in the right column.
skills_section(data, language),
)
}