|
334 | 334 |
|
335 | 335 | let contacts = { |
336 | 336 | set box(height: 9pt) |
337 | | - |
338 | | - let separator = box(width: 5pt) |
| 337 | + let items = () |
| 338 | + |
| 339 | + if "birth" in author { |
| 340 | + items.push(box[ |
| 341 | + #birth-icon |
| 342 | + #box[#text(author.birth)] |
| 343 | + ]) |
| 344 | + } |
| 345 | + if "phone" in author { |
| 346 | + items.push(box[ |
| 347 | + #phone-icon |
| 348 | + #box[#link("tel:" + author.phone)[#author.phone]] |
| 349 | + ]) |
| 350 | + } |
| 351 | + if "email" in author { |
| 352 | + items.push(box[ |
| 353 | + #email-icon |
| 354 | + #box[#link("mailto:" + author.email)[#author.email]] |
| 355 | + ]) |
| 356 | + } |
| 357 | + if "homepage" in author { |
| 358 | + items.push(box[ |
| 359 | + #homepage-icon |
| 360 | + #box[#link(author.homepage)[#author.homepage]] |
| 361 | + ]) |
| 362 | + } |
| 363 | + if "github" in author { |
| 364 | + items.push(box[ |
| 365 | + #github-icon |
| 366 | + #box[#link("https://github.com/" + author.github)[#author.github]] |
| 367 | + ]) |
| 368 | + } |
| 369 | + if "gitlab" in author { |
| 370 | + items.push(box[ |
| 371 | + #gitlab-icon |
| 372 | + #box[#link("https://gitlab.com/" + author.gitlab)[#author.gitlab]] |
| 373 | + ]) |
| 374 | + } |
| 375 | + if "bitbucket" in author { |
| 376 | + items.push(box[ |
| 377 | + #bitbucket-icon |
| 378 | + #box[#link( |
| 379 | + "https://bitbucket.org/" + author.bitbucket, |
| 380 | + )[#author.bitbucket]] |
| 381 | + ]) |
| 382 | + } |
| 383 | + if "linkedin" in author { |
| 384 | + items.push(box[ |
| 385 | + #linkedin-icon |
| 386 | + #box[ |
| 387 | + #link( |
| 388 | + "https://www.linkedin.com/in/" + author.linkedin, |
| 389 | + )[#author.firstname #author.lastname] |
| 390 | + ] |
| 391 | + ]) |
| 392 | + } |
| 393 | + if "twitter" in author { |
| 394 | + items.push(box[ |
| 395 | + #twitter-icon |
| 396 | + #box[#link( |
| 397 | + "https://twitter.com/" + author.twitter, |
| 398 | + )[\@#author.twitter]] |
| 399 | + ]) |
| 400 | + } |
| 401 | + if "scholar" in author { |
| 402 | + let fullname = str(author.firstname + " " + author.lastname) |
| 403 | + items.push(box[ |
| 404 | + #google-scholar-icon |
| 405 | + #box[#link( |
| 406 | + "https://scholar.google.com/citations?user=" + author.scholar, |
| 407 | + )[#fullname]] |
| 408 | + ]) |
| 409 | + } |
| 410 | + if "orcid" in author { |
| 411 | + items.push(box[ |
| 412 | + #orcid-icon |
| 413 | + #box[#link("https://orcid.org/" + author.orcid)[#author.orcid]] |
| 414 | + ]) |
| 415 | + } |
| 416 | + if "website" in author { |
| 417 | + items.push(box[ |
| 418 | + #website-icon |
| 419 | + #box[#link(author.website)[#author.website]] |
| 420 | + ]) |
| 421 | + } |
| 422 | + if "custom" in author and type(author.custom) == array { |
| 423 | + for item in author.custom { |
| 424 | + if "text" in item { |
| 425 | + items.push(box[ |
| 426 | + #if ("icon" in item) { |
| 427 | + box(fa-icon(item.icon, fill: color-darknight)) |
| 428 | + } |
| 429 | + #box[ |
| 430 | + #if ("link" in item) { |
| 431 | + link(item.link)[#item.text] |
| 432 | + } else { |
| 433 | + item.text |
| 434 | + } |
| 435 | + ] |
| 436 | + ]) |
| 437 | + } |
| 438 | + } |
| 439 | + } |
339 | 440 |
|
340 | 441 | align(center)[ |
341 | 442 | #set text(size: 9pt, weight: "regular", style: "normal") |
342 | 443 | #block[ |
343 | 444 | #align(horizon)[ |
344 | | - #if ("birth" in author) [ |
345 | | - #birth-icon |
346 | | - #box[#text(author.birth)] |
347 | | - #separator |
348 | | - ] |
349 | | - #if ("phone" in author) [ |
350 | | - #phone-icon |
351 | | - #box[#link("tel:" + author.phone)[#author.phone]] |
352 | | - #separator |
353 | | - ] |
354 | | - #if ("email" in author) [ |
355 | | - #email-icon |
356 | | - #box[#link("mailto:" + author.email)[#author.email]] |
357 | | - ] |
358 | | - #if ("homepage" in author) [ |
359 | | - #separator |
360 | | - #homepage-icon |
361 | | - #box[#link(author.homepage)[#author.homepage]] |
362 | | - ] |
363 | | - #if ("github" in author) [ |
364 | | - #separator |
365 | | - #github-icon |
366 | | - #box[#link("https://github.com/" + author.github)[#author.github]] |
367 | | - ] |
368 | | - #if ("gitlab" in author) [ |
369 | | - #separator |
370 | | - #gitlab-icon |
371 | | - #box[#link("https://gitlab.com/" + author.gitlab)[#author.gitlab]] |
372 | | - ] |
373 | | - #if ("bitbucket" in author) [ |
374 | | - #separator |
375 | | - #bitbucket-icon |
376 | | - #box[#link( |
377 | | - "https://bitbucket.org/" + author.bitbucket, |
378 | | - )[#author.bitbucket]] |
379 | | - ] |
380 | | - #if ("linkedin" in author) [ |
381 | | - #separator |
382 | | - #linkedin-icon |
383 | | - #box[ |
384 | | - #link( |
385 | | - "https://www.linkedin.com/in/" + author.linkedin, |
386 | | - )[#author.firstname #author.lastname] |
387 | | - ] |
388 | | - ] |
389 | | - #if ("twitter" in author) [ |
390 | | - #separator |
391 | | - #twitter-icon |
392 | | - #box[#link( |
393 | | - "https://twitter.com/" + author.twitter, |
394 | | - )[\@#author.twitter]] |
395 | | - ] |
396 | | - #if ("scholar" in author) [ |
397 | | - #let fullname = str(author.firstname + " " + author.lastname) |
398 | | - #separator |
399 | | - #google-scholar-icon |
400 | | - #box[#link( |
401 | | - "https://scholar.google.com/citations?user=" + author.scholar, |
402 | | - )[#fullname]] |
403 | | - ] |
404 | | - #if ("orcid" in author) [ |
405 | | - #separator |
406 | | - #orcid-icon |
407 | | - #box[#link("https://orcid.org/" + author.orcid)[#author.orcid]] |
408 | | - ] |
409 | | - #if ("website" in author) [ |
410 | | - #separator |
411 | | - #website-icon |
412 | | - #box[#link(author.website)[#author.website]] |
413 | | - ] |
414 | | - #if ("custom" in author and type(author.custom) == array) [ |
415 | | - #for item in author.custom [ |
416 | | - #if ("text" in item) [ |
417 | | - #separator |
418 | | - #if ("icon" in item) [ |
419 | | - #box(fa-icon(item.icon, fill: color-darknight)) |
420 | | - ] |
421 | | - #box[ |
422 | | - #if ("link" in item) [ |
423 | | - #link(item.link)[#item.text] |
424 | | - ] else [ |
425 | | - #item.text |
426 | | - ] |
427 | | - ] |
428 | | - ] |
429 | | - ] |
430 | | - ] |
| 445 | + #items.join(h(10pt)) |
431 | 446 | ] |
432 | 447 | ] |
433 | 448 | ] |
|
0 commit comments