Add the main Typst entrypoint.
This commit is contained in:
parent
e58397a59f
commit
79c79d647a
|
@ -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),
|
||||||
|
)
|
||||||
|
}
|
Loading…
Reference in New Issue