From 7a503d61fbef8e61bc8fcb5d650eecbe082428a4 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 19 Sep 2024 17:21:03 +0200 Subject: [PATCH] Allow setting sidebar or not for cv --- cv.typ | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/cv.typ b/cv.typ index 445986c..89bb34c 100644 --- a/cv.typ +++ b/cv.typ @@ -133,7 +133,7 @@ } } -#let cv(contents) = { +#let cv(contents, use_sidebar: false) = { set text(lang: lang) let date_formatting = { @@ -182,23 +182,25 @@ section(title: title, entries:contents.thesis + contents.education)[] } - if "volunteering" in contents { - let title = sel_word_lang(en:"Volunteer Work", de:"Ehrenamt") - section(title: title, entries:contents.volunteering)[] - } + if not use_sidebar { + if "volunteering" in contents { + let title = sel_word_lang(en:"Volunteer Work", de:"Ehrenamt") + section(title: title, entries:contents.volunteering)[] + } - if "skills" in contents { - let title = sel_word_lang(en:"Qualifications", de:"Qualifikationen") - section(title: title, { - skill_item(item:contents.skills) - }) - } + if "skills" in contents { + let title = sel_word_lang(en:"Qualifications", de:"Qualifikationen") + section(title: title, { + skill_item(item:contents.skills) + }) + } - if "languages" in contents { - let title = sel_word_lang(en:"Languages", de:"Sprachen") - section(title: title, { - skill_item(item:contents.languages) - }) + if "languages" in contents { + let title = sel_word_lang(en:"Languages", de:"Sprachen") + section(title: title, { + skill_item(item:contents.languages) + }) + } } } @@ -228,6 +230,10 @@ } } + if not use_sidebar { + body + return + } let margin = 1pt grid( columns: (2fr, 1fr), @@ -264,7 +270,7 @@ } -#cv( +#cv.with(use_sidebar: false)( yaml("content.yml") )