feat(resume): Allow toggling longform for main body contents
This commit is contained in:
parent
2684de9cc0
commit
e8d9f678c2
3 changed files with 15 additions and 12 deletions
|
|
@ -131,11 +131,11 @@
|
||||||
horizon_line()
|
horizon_line()
|
||||||
};
|
};
|
||||||
|
|
||||||
#let section(title: "Section", entries: (), body) = {
|
#let section(title: "Section", entries: (), longform: true, body) = {
|
||||||
section_header(title)
|
section_header(title)
|
||||||
if body == none or body == [] {
|
if body == none or body == [] {
|
||||||
for e in entries {
|
for e in entries {
|
||||||
entry(item: e)
|
entry(item: e, show_sublists: longform)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
body
|
body
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#import "lib.typ": *
|
#import "lib.typ": *
|
||||||
#import "wrapit.typ": *
|
#import "wrapit.typ": *
|
||||||
|
|
||||||
#let create_body(main: (), contents: (:)) = {
|
#let create_body(main: (), contents: (:), longform: true) = {
|
||||||
for item in main {
|
for item in main {
|
||||||
if item == "summary" and "summary" in contents {
|
if item == "summary" and "summary" in contents {
|
||||||
section(
|
section(
|
||||||
|
|
@ -9,36 +9,37 @@
|
||||||
{
|
{
|
||||||
contents.summary.at(lang)
|
contents.summary.at(lang)
|
||||||
},
|
},
|
||||||
|
longform: longform
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
if item == "experience_by_type" and "experience" in contents {
|
if item == "experience_by_type" and "experience" in contents {
|
||||||
let title = (en: "Professional Experience", de: "Berufserfahrung").at(lang)
|
let title = (en: "Professional Experience", de: "Berufserfahrung").at(lang)
|
||||||
section(title: title)[]
|
section(title: title, longform: longform)[]
|
||||||
by_experience_type(experience: contents.experience, type: contents.experience_types)
|
by_experience_type(experience: contents.experience, type: contents.experience_types)
|
||||||
}
|
}
|
||||||
if item == "experience_by_client" and "experience" in contents {
|
if item == "experience_by_client" and "experience" in contents {
|
||||||
let title = (en: "Professional Experience", de: "Berufserfahrung").at(lang)
|
let title = (en: "Professional Experience", de: "Berufserfahrung").at(lang)
|
||||||
section(title: title)[]
|
section(title: title, longform: longform)[]
|
||||||
by_client(experience: contents.experience)
|
by_client(experience: contents.experience)
|
||||||
}
|
}
|
||||||
if item == "experience" and "experience" in contents {
|
if item == "experience" and "experience" in contents {
|
||||||
let title = (en: "Professional Experience", de: "Berufserfahrung").at(lang)
|
let title = (en: "Professional Experience", de: "Berufserfahrung").at(lang)
|
||||||
section(title: title, entries: contents.experience)[]
|
section(title: title, entries: contents.experience, longform: longform)[]
|
||||||
}
|
}
|
||||||
|
|
||||||
if item == "education" and "education" in contents {
|
if item == "education" and "education" in contents {
|
||||||
let title = (en: "Education", de: "Ausbildung").at(lang)
|
let title = (en: "Education", de: "Ausbildung").at(lang)
|
||||||
section(title: title, entries: contents.thesis + contents.education)[]
|
section(title: title, entries: contents.thesis + contents.education, longform: longform)[]
|
||||||
}
|
}
|
||||||
|
|
||||||
if item == "volunteering" and "volunteering" in contents {
|
if item == "volunteering" and "volunteering" in contents {
|
||||||
let title = (en: "Volunteer Work", de: "Ehrenamt").at(lang)
|
let title = (en: "Volunteer Work", de: "Ehrenamt").at(lang)
|
||||||
section(title: title, entries: contents.volunteering)[]
|
section(title: title, entries: contents.volunteering, longform: longform)[]
|
||||||
}
|
}
|
||||||
if item == "digital" and "digital" in contents {
|
if item == "digital" and "digital" in contents {
|
||||||
let title = (en: "Digital Organization", de: "Digitales Schaffen").at(lang)
|
let title = (en: "Digital Organization", de: "Digitales Schaffen").at(lang)
|
||||||
section(title: title, entries: contents.digital)[]
|
section(title: title, entries: contents.digital, longform: longform)[]
|
||||||
}
|
}
|
||||||
|
|
||||||
if item == "skills" and "skills" in contents {
|
if item == "skills" and "skills" in contents {
|
||||||
|
|
@ -48,6 +49,7 @@
|
||||||
{
|
{
|
||||||
sidebar_entry(item: contents.skills)
|
sidebar_entry(item: contents.skills)
|
||||||
},
|
},
|
||||||
|
longform: longform
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -58,6 +60,7 @@
|
||||||
{
|
{
|
||||||
sidebar_entry(item: contents.languages)
|
sidebar_entry(item: contents.languages)
|
||||||
},
|
},
|
||||||
|
longform: longform
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -91,7 +94,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#let resume(contents, main: ("experience_by_type", "education"), sidebar: ("volunteering", "languages", "skills")) = {
|
#let resume(contents, main: ("experience_by_type", "education"), sidebar: ("volunteering", "languages", "skills"), longform:true) = {
|
||||||
show: style
|
show: style
|
||||||
set text(lang: lang)
|
set text(lang: lang)
|
||||||
|
|
||||||
|
|
@ -158,7 +161,7 @@
|
||||||
} else { [] }
|
} else { [] }
|
||||||
wrap-content(
|
wrap-content(
|
||||||
sb,
|
sb,
|
||||||
create_body(main: main, contents: contents),
|
create_body(main: main, contents: contents, longform: longform),
|
||||||
align: top + right,
|
align: top + right,
|
||||||
columns: (auto, 30%),
|
columns: (auto, 30%),
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
#import "lib/resume.typ": resume
|
#import "lib/resume.typ": resume
|
||||||
|
|
||||||
#resume.with()(yaml("content.yml"))
|
#resume.with(longform: false)(yaml("content.yml"))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue