From 6fb0bbebbdb1dcd504bdfb74694981331e360a04 Mon Sep 17 00:00:00 2001 From: Romain Paquet Date: Sat, 25 Oct 2025 00:15:22 +0200 Subject: [PATCH] =?UTF-8?q?resum=C3=A9:=20use=20one=20document=20per=20lan?= =?UTF-8?q?guage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resumé/{data.yml => _data/contact.yml} | 0 resumé/all.typ | 3 +++ resumé/en.typ | 2 ++ resumé/fr.typ | 2 ++ resumé/main.typ | 37 +++++++++++--------------- 5 files changed, 23 insertions(+), 21 deletions(-) rename resumé/{data.yml => _data/contact.yml} (100%) create mode 100644 resumé/all.typ create mode 100644 resumé/en.typ create mode 100644 resumé/fr.typ diff --git a/resumé/data.yml b/resumé/_data/contact.yml similarity index 100% rename from resumé/data.yml rename to resumé/_data/contact.yml diff --git a/resumé/all.typ b/resumé/all.typ new file mode 100644 index 0000000..e6397b2 --- /dev/null +++ b/resumé/all.typ @@ -0,0 +1,3 @@ +#import "main.typ": mkCV +#let languages = ("fr", "en") +#languages.map(mkCV).join() diff --git a/resumé/en.typ b/resumé/en.typ new file mode 100644 index 0000000..9e2745d --- /dev/null +++ b/resumé/en.typ @@ -0,0 +1,2 @@ +#import "main.typ": mkCV +#mkCV("en") diff --git a/resumé/fr.typ b/resumé/fr.typ new file mode 100644 index 0000000..ab32abd --- /dev/null +++ b/resumé/fr.typ @@ -0,0 +1,2 @@ +#import "main.typ": mkCV +#mkCV("fr") diff --git a/resumé/main.typ b/resumé/main.typ index b9d351c..587afad 100644 --- a/resumé/main.typ +++ b/resumé/main.typ @@ -1,31 +1,26 @@ #import "localize.typ": localize -#let languages = ("fr", "en") +#let mkCV(language) = [ #set page( paper: "a4", columns: 2, margin: 10mm, ) - -#languages.map(language => [ - + #set text(lang: language) #let accent-color = rgb(0x06, 0x92, 0xaa, 255) -#let load-section(path) = localize(language, yaml(path)) +#let load(path) = localize(language, yaml(path)) -#let education = load-section("_data/sections/education.yml") -#let experiences = load-section("_data/sections/experiences.yml") -#let hobbies = load-section("_data/sections/hobbies.yml") -#let languages = load-section("_data/sections/languages.yml") -#let skills = load-section("_data/sections/skills.yml") -#let introduction = load-section("_data/introduction.yml") - -#let data = yaml("data.yml") -#let words = localize(language, yaml("_data/words.yml")) - -#let tr(key) = key.split(".").fold(words, (d, k) => d.at(k)).at(language) +#let education = load("_data/sections/education.yml") +#let experiences = load("_data/sections/experiences.yml") +#let hobbies = load("_data/sections/hobbies.yml") +#let languages = load("_data/sections/languages.yml") +#let skills = load("_data/sections/skills.yml") +#let introduction = load("_data/introduction.yml") +#let contact = yaml("_data/contact.yml") +#let words = load("_data/words.yml") #let date-range(date) = [ #date.begin --- #date.end ] @@ -50,7 +45,7 @@ 1 Rue Auguste Renoir \ 38400 Saint-Martin-d'Hères \ (+33) 06 58 92 15 86 \ - #for email in data.emails [ + #for email in contact.emails [ #link("mailto:" + email) \ ] #link("https://rpqt.fr") @@ -79,7 +74,7 @@ scope: "parent", [ #line(length: 100%) - #introduction + #eval(introduction, mode: "markup") #line(length: 100%) ] ) @@ -130,11 +125,11 @@ #for hobby in hobbies.items [ #if hobby.keys().contains("items") [ *#hobby.name* - #hobby.items.map(i => [ - #i]).join() + #hobby.items.map(i => [ - #eval(i, mode: "markup")]).join() ] else [ - *#hobby.name* -- #hobby.at("content") + *#hobby.name* -- #eval(hobby.at("content"), mode: "markup") ] ] -]).join() +]