resumé: use one document per language

This commit is contained in:
2025-10-25 00:15:22 +02:00
parent 4249085236
commit 6fb0bbebbd
5 changed files with 23 additions and 21 deletions

3
resumé/all.typ Normal file
View File

@@ -0,0 +1,3 @@
#import "main.typ": mkCV
#let languages = ("fr", "en")
#languages.map(mkCV).join()

2
resumé/en.typ Normal file
View File

@@ -0,0 +1,2 @@
#import "main.typ": mkCV
#mkCV("en")

2
resumé/fr.typ Normal file
View File

@@ -0,0 +1,2 @@
#import "main.typ": mkCV
#mkCV("fr")

View File

@@ -1,31 +1,26 @@
#import "localize.typ": localize #import "localize.typ": localize
#let languages = ("fr", "en") #let mkCV(language) = [
#set page( #set page(
paper: "a4", paper: "a4",
columns: 2, columns: 2,
margin: 10mm, margin: 10mm,
) )
#languages.map(language => [
#set text(lang: language) #set text(lang: language)
#let accent-color = rgb(0x06, 0x92, 0xaa, 255) #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 education = load("_data/sections/education.yml")
#let experiences = load-section("_data/sections/experiences.yml") #let experiences = load("_data/sections/experiences.yml")
#let hobbies = load-section("_data/sections/hobbies.yml") #let hobbies = load("_data/sections/hobbies.yml")
#let languages = load-section("_data/sections/languages.yml") #let languages = load("_data/sections/languages.yml")
#let skills = load-section("_data/sections/skills.yml") #let skills = load("_data/sections/skills.yml")
#let introduction = load-section("_data/introduction.yml") #let introduction = load("_data/introduction.yml")
#let contact = yaml("_data/contact.yml")
#let data = yaml("data.yml") #let words = load("_data/words.yml")
#let words = localize(language, yaml("_data/words.yml"))
#let tr(key) = key.split(".").fold(words, (d, k) => d.at(k)).at(language)
#let date-range(date) = [ #date.begin --- #date.end ] #let date-range(date) = [ #date.begin --- #date.end ]
@@ -50,7 +45,7 @@
1 Rue Auguste Renoir \ 1 Rue Auguste Renoir \
38400 Saint-Martin-d'Hères \ 38400 Saint-Martin-d'Hères \
(+33) 06 58 92 15 86 \ (+33) 06 58 92 15 86 \
#for email in data.emails [ #for email in contact.emails [
#link("mailto:" + email) \ #link("mailto:" + email) \
] ]
#link("https://rpqt.fr") #link("https://rpqt.fr")
@@ -79,7 +74,7 @@
scope: "parent", scope: "parent",
[ [
#line(length: 100%) #line(length: 100%)
#introduction #eval(introduction, mode: "markup")
#line(length: 100%) #line(length: 100%)
] ]
) )
@@ -130,11 +125,11 @@
#for hobby in hobbies.items [ #for hobby in hobbies.items [
#if hobby.keys().contains("items") [ #if hobby.keys().contains("items") [
*#hobby.name* *#hobby.name*
#hobby.items.map(i => [ - #i]).join() #hobby.items.map(i => [ - #eval(i, mode: "markup")]).join()
] else [ ] else [
*#hobby.name* -- #hobby.at("content") *#hobby.name* -- #eval(hobby.at("content"), mode: "markup")
] ]
] ]
]).join() ]