|
| 1 | +#import "@preview/nerd-icons:0.2.0": nf-icon |
1 | 2 | #import "./share.typ": * |
2 | 3 | #import "./layouts.typ": * |
3 | 4 | #import "../locales.typ": * |
|
23 | 24 | ) = { |
24 | 25 | align(position)[ |
25 | 26 | #upper(text(base-font-size + 16pt, weight: "extrabold")[#title]) |
26 | | - #v(-1em) |
| 27 | + #v(-0.8em) |
27 | 28 | ] |
28 | 29 | align(position)[ |
29 | 30 | #upper(text(base-font-size + 6pt, weight: "bold")[#label]) |
30 | | - #v(-0.5em) |
| 31 | + #v(-0.3em) |
31 | 32 | ] |
32 | 33 | } |
33 | 34 |
|
|
42 | 43 | #{ |
43 | 44 | let gap = 0.2em |
44 | 45 | let items = ( |
45 | | - contact_item(location), |
46 | | - contact_item(phone, link-type: "tel:"), |
47 | | - contact_item(email, link-type: "mailto:"), |
48 | | - contact_item(url, link-type: "https://"), |
| 46 | + [ |
| 47 | + #nf-icon("map") |
| 48 | + #h(0.4em) |
| 49 | + #contact_item(location) |
| 50 | + ], |
| 51 | + [ |
| 52 | + #nf-icon("phone") |
| 53 | + #h(0.4em) |
| 54 | + #contact_item(phone, link-type: "tel:"), |
| 55 | + ], |
| 56 | + [ |
| 57 | + #nf-icon("email") |
| 58 | + #h(0.4em) |
| 59 | + #contact_item(email, link-type: "mailto:") |
| 60 | + ], |
| 61 | + [ |
| 62 | + #nf-icon("web") |
| 63 | + #h(0.4em) |
| 64 | + #contact_item(url, link-type: "https://") |
| 65 | + ], |
49 | 66 | ) |
50 | 67 |
|
51 | 68 | items |
|
79 | 96 | let period = start-date + " ~ " + end-date |
80 | 97 | generic_2x2( |
81 | 98 | (1fr, 1fr), |
82 | | - strong(if website == "" { company } else { link(website)[#company] }), |
83 | | - [_*#period*_], |
| 99 | + strong( |
| 100 | + if website == "" { |
| 101 | + company |
| 102 | + } else { |
| 103 | + [ |
| 104 | + #underline[#link(website)[#company]] |
| 105 | + #nf-icon("web") |
| 106 | + ] |
| 107 | + }, |
| 108 | + ), |
| 109 | + emph(period), |
84 | 110 | emph(position), |
85 | 111 | emph(location), |
86 | 112 | ) |
|
99 | 125 | website: work-item.at("website", default: ""), |
100 | 126 | location: location-to-str(work-item.at("location", default: "")), |
101 | 127 | position: work-item.at("position", default: ""), |
102 | | - start-date: date-to-str(work-item.at("startDate", default: "")), |
103 | | - end-date: date-to-str(work-item.at("endDate", default: "")), |
| 128 | + start-date: date-to-str( |
| 129 | + date: work-item.at("startDate", default: ""), |
| 130 | + lang: lang, |
| 131 | + ), |
| 132 | + end-date: date-to-str( |
| 133 | + date: work-item.at("endDate", default: ""), |
| 134 | + lang: lang, |
| 135 | + ), |
104 | 136 | summary: work-item.at("summary", default: ""), |
105 | 137 | highlights: work-item.at("highlights", default: ()), |
106 | 138 | )) |
|
125 | 157 | let period = start-date + " ~ " + end-date |
126 | 158 | generic_2x2( |
127 | 159 | (1fr, 1fr), |
128 | | - strong(if website == "" { name } else { link(website)[#name] }), |
129 | | - [_*#period*_], |
| 160 | + strong( |
| 161 | + if website == "" { |
| 162 | + name |
| 163 | + } else { |
| 164 | + [ |
| 165 | + #underline[#link(website)[#name]] |
| 166 | + #nf-icon("web") |
| 167 | + ] |
| 168 | + }, |
| 169 | + ), |
| 170 | + emph(period), |
130 | 171 | if github-url == "" { |
131 | 172 | "" |
132 | 173 | } else { |
133 | | - underline(offset: 0.2em)[#emph(link(github-url)[#"Repo Link"])] |
| 174 | + [ |
| 175 | + #underline(offset: 0.2em)[ |
| 176 | + #emph(link(github-url)[#"Repo"]) |
| 177 | + ] |
| 178 | + #nf-icon("link") |
| 179 | + ] |
134 | 180 | }, |
135 | 181 | "", |
136 | 182 | ) |
|
148 | 194 | name: project-item.at("name", default: ""), |
149 | 195 | website: project-item.at("website", default: ""), |
150 | 196 | github-url: project-item.at("githubUrl", default: ""), |
151 | | - start-date: date-to-str(project-item.at("startDate", default: "")), |
152 | | - end-date: date-to-str(project-item.at("endDate", default: "")), |
| 197 | + start-date: date-to-str( |
| 198 | + date: project-item.at("startDate", default: ""), |
| 199 | + lang: lang, |
| 200 | + ), |
| 201 | + end-date: date-to-str( |
| 202 | + date: project-item.at("endDate", default: ""), |
| 203 | + lang: lang, |
| 204 | + ), |
153 | 205 | summary: project-item.at("summary", default: ""), |
154 | 206 | highlights: project-item.at("highlights", default: ()), |
155 | 207 | )) |
|
171 | 223 | ) = { |
172 | 224 | generic_2x2( |
173 | 225 | (1fr, 1fr), |
174 | | - strong(if url == "" { name } else { link(url)[#name] }), |
175 | | - [_*#release-date*_], |
| 226 | + strong( |
| 227 | + if url == "" { |
| 228 | + name |
| 229 | + } else { |
| 230 | + [ |
| 231 | + #underline[#link(url)[#name]] |
| 232 | + #nf-icon("web") |
| 233 | + ] |
| 234 | + }, |
| 235 | + ), |
| 236 | + emph(release-date), |
176 | 237 | emph(publisher), |
177 | 238 | "", |
178 | 239 | ) |
|
186 | 247 | .map(publication-item => single-publication-item( |
187 | 248 | name: publication-item.at("name", default: ""), |
188 | 249 | url: publication-item.at("url", default: ""), |
189 | | - release-date: date-to-str(publication-item.at("releaseDate", default: "")), |
| 250 | + release-date: date-to-str( |
| 251 | + date: publication-item.at("releaseDate", default: ""), |
| 252 | + lang: lang, |
| 253 | + ), |
190 | 254 | publisher: publication-item.at("publisher", default: ""), |
191 | 255 | summary: publication-item.at("summary", default: ""), |
192 | 256 | )) |
|
214 | 278 | generic_2x2( |
215 | 279 | (1fr, 1fr), |
216 | 280 | [*#institution*], |
217 | | - [_*#period*_], |
| 281 | + emph(period), |
218 | 282 | emph(degree), |
219 | 283 | emph(location), |
220 | 284 | ) |
|
237 | 301 | major: education-item.at("major", default: ""), |
238 | 302 | degree: education-item.at("degree", default: ""), |
239 | 303 | gpa: education-item.at("gpa", default: ""), |
240 | | - start-date: date-to-str(education-item.at("startDate", default: "")), |
241 | | - end-date: date-to-str(education-item.at("endDate", default: "")), |
| 304 | + start-date: date-to-str( |
| 305 | + date: education-item.at("startDate", default: ""), |
| 306 | + lang: lang, |
| 307 | + ), |
| 308 | + end-date: date-to-str( |
| 309 | + date: education-item.at("endDate", default: ""), |
| 310 | + lang: lang, |
| 311 | + ), |
242 | 312 | activities: education-item.at("activities", default: ()), |
243 | 313 | courses: education-item.at("courses", default: ()), |
244 | 314 | )) |
|
261 | 331 | let period = issue-date + " ~ " + exp-date |
262 | 332 | generic_2x2( |
263 | 333 | (1fr, 1fr), |
264 | | - strong(if url == "" { name } else { link(url)[#name] }), |
265 | | - [_*#period*_], |
| 334 | + strong( |
| 335 | + if url == "" { |
| 336 | + name |
| 337 | + } else { |
| 338 | + [ |
| 339 | + #underline[#link(url)[#name]] |
| 340 | + #nf-icon("web") |
| 341 | + ] |
| 342 | + }, |
| 343 | + ), |
| 344 | + emph(period), |
266 | 345 | emph(issuer), |
267 | 346 | "", |
268 | 347 | ) |
269 | 348 | } |
270 | 349 |
|
271 | 350 | [ |
272 | 351 | = #i18n.title.certifications.at(lang) |
273 | | - #for certificate-item in data { |
274 | | - single-certificate-item( |
275 | | - name: certificate-item.at("name", default: ""), |
276 | | - url: certificate-item.at("url", default: ""), |
277 | | - issue-date: date-to-str(certificate-item.at("issueDate", default: "")), |
278 | | - exp-date: date-to-str(certificate-item.at("expDate", default: "")), |
279 | | - issuer: certificate-item.at("issuer", default: ""), |
280 | | - ) |
281 | | - } |
| 352 | + #( |
| 353 | + data |
| 354 | + .map(certificate-item => single-certificate-item( |
| 355 | + name: certificate-item.at("name", default: ""), |
| 356 | + url: certificate-item.at("url", default: ""), |
| 357 | + issue-date: date-to-str( |
| 358 | + date: certificate-item.at("issueDate", default: ""), |
| 359 | + lang: lang, |
| 360 | + ), |
| 361 | + exp-date: date-to-str( |
| 362 | + date: certificate-item.at("expDate", default: ""), |
| 363 | + lang: lang, |
| 364 | + ), |
| 365 | + issuer: certificate-item.at("issuer", default: ""), |
| 366 | + )) |
| 367 | + .join(v(0.6em)) |
| 368 | + ) |
282 | 369 | ] |
283 | 370 | } |
284 | 371 |
|
|
296 | 383 | generic_2x2( |
297 | 384 | (auto, 1fr), |
298 | 385 | strong(title), |
299 | | - [_*#date*_], |
| 386 | + emph(date), |
300 | 387 | emph(awarder), |
301 | 388 | "", |
302 | 389 | ) |
|
316 | 403 | data |
317 | 404 | .map(award-item => single-award-item( |
318 | 405 | title: award-item.at("title", default: ""), |
319 | | - date: date-to-str(award-item.at("date", default: "")), |
| 406 | + date: date-to-str( |
| 407 | + date: award-item.at("date", default: ""), |
| 408 | + lang: lang, |
| 409 | + ), |
320 | 410 | awarder: award-item.at("awarder", default: ""), |
321 | 411 | summary: award-item.at("summary", default: ""), |
322 | 412 | description: award-item.at("description", default: ""), |
|
0 commit comments