Last active
February 10, 2024 01:39
-
-
Save azrsh/31e9825890a3b44610523136bbc8a925 to your computer and use it in GitHub Desktop.
Typst で履歴書を作るテンプレート
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#set text(font: ("IPAexMincho")) | |
#let data = yaml("input/data.yaml") | |
= 履歴書 | |
#let today = datetime.today() | |
#let birthday = datetime(year: data.birth_day.year, month: data.birth_day.month, day: data.birth_day.day) | |
#let age = { | |
let after-birthday = today.month() > birthday.month() or ( | |
today.month() == birthday.month() and today.day() >= birthday.day() | |
); | |
today.year() - birthday.year() + if after-birthday { 0 } else { -1 } | |
} | |
#today.display("[year]年[month padding:none]月[day padding:none]日")現在 | |
#grid( | |
columns: (3fr, 1fr), | |
align(center)[ | |
#table( | |
columns: (1fr, 3fr), | |
inset: 10pt, | |
align: horizon, | |
[氏名],[#data.name], | |
[ふりがな],[#data.name_kana], | |
[生年月日],[#{birthday.display("[year]年[month padding:none]月[day padding:none]日")} (満#{age}歳)], | |
[現住所],[#data.address], | |
[携帯],[#data.cell_phone], | |
[メール],[#data.email] | |
) | |
], | |
align(center)[ | |
#image("input/campussquare.jfif", width: 100pt), | |
] | |
) | |
== 経歴 | |
#table( | |
columns: (auto, auto, 1fr), | |
inset: 10pt, | |
align: horizon, | |
align(center)[年], align(center)[月], [学歴], | |
..for (year, month, value) in data.education { | |
(align(center)[#year], align(center)[#month], value) | |
}.flatten() | |
) | |
#table( | |
columns: (auto, auto, 1fr), | |
inset: 10pt, | |
align: horizon, | |
align(center)[年], align(center)[月], [職歴], | |
..for (year, month, value) in data.experience { | |
(align(center)[#year], align(center)[#month], value) | |
}.flatten(), | |
[], [], [現在に至る] | |
) | |
== 免許・資格 | |
#table( | |
columns: (auto, auto, 1fr), | |
inset: 10pt, | |
align: horizon, | |
align(center)[年], align(center)[月], [免許・資格], | |
..for (year, month, value) in data.licences { | |
(align(center)[#year], align(center)[#month], value) | |
}.flatten(), | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment