feat(resume): Add ability to reorder sections

Both in main and in sidebar, sections can be reordered simply by
changing the order they appar in the array adding them.

`#resume.with(main:("education", "experience"))` displays education
before experience items.
This commit is contained in:
Marty Oehme 2025-03-18 14:57:57 +01:00
parent f60991344d
commit 1a62b90df7
Signed by: Marty
GPG key ID: 4E535BC19C61886E

View file

@ -68,7 +68,8 @@
header(contents.about)
let body = {
if "summary" in main and "summary" in contents {
for item in main {
if item == "summary" and "summary" in contents {
section(
title: "",
{
@ -77,32 +78,32 @@
)
}
if "experience_by_type" in main and "experience" in contents {
if item == "experience_by_type" and "experience" in contents {
let title = (en: "Professional Experience", de: "Berufserfahrung").at(lang)
section(title: title)[]
by_experience_type(experience: contents.experience, type: contents.experience_types)
}
if "experience_by_client" in main and "experience" in contents {
if item == "experience_by_client" and "experience" in contents {
let title = (en: "Professional Experience", de: "Berufserfahrung").at(lang)
section(title: title)[]
by_client(experience: contents.experience)
}
if "experience" in main and "experience" in contents {
if item == "experience" and "experience" in contents {
let title = (en: "Professional Experience", de: "Berufserfahrung").at(lang)
section(title: title, entries: contents.experience)[]
}
if "education" in main and "education" in contents {
if item == "education" and "education" in contents {
let title = (en: "Education", de: "Ausbildung").at(lang)
section(title: title, entries: contents.thesis + contents.education)[]
}
if "volunteering" in main and "volunteering" in contents {
if item == "volunteering" and "volunteering" in contents {
let title = (en: "Volunteer Work", de: "Ehrenamt").at(lang)
section(title: title, entries: contents.volunteering)[]
}
if "skills" in main and "skills" in contents {
if item == "skills" and "skills" in contents {
let title = (en: "Qualifications", de: "Qualifikationen").at(lang)
section(
title: title,
@ -112,7 +113,7 @@
)
}
if "languages" in main and "languages" in contents {
if item == "languages" and "languages" in contents {
let title = (en: "Languages", de: "Sprachen").at(lang)
section(
title: title,
@ -122,9 +123,11 @@
)
}
}
}
let sidebar = {
if "volunteering" in sidebar and "volunteering" in contents {
for item in sidebar {
if item == "volunteering" and "volunteering" in contents {
let title = (en: "Volunteer Work", de: "Ehrenamt").at(lang)
[== #title]
for e in contents.at("volunteering") {
@ -135,19 +138,20 @@
}
}
if "languages" in sidebar and "languages" in contents {
if item == "languages" and "languages" in contents {
let title = (en: "Languages", de: "Sprachen").at(lang)
[== #title]
skill_item(item: contents.languages, is_sidebar: true)
[\ ]
}
if "skills" in sidebar and "skills" in contents {
if item == "skills" and "skills" in contents {
let title = (en: "Qualifications", de: "Kenntnisse").at(lang)
[== #title]
skill_item(item: contents.skills, is_sidebar: true)
}
}
}
let margin = 1pt
grid(