Ignore contact fields that are set to none (#16)

* Add optional contact info

Ignore contact fields that are set to none. 
Email is taken as the "priority" field which is most likely set and therefore doesn't have a separator field included. This could be either set to a different field or be replaced by a better function.

* Fix Expression error

---------

Co-authored-by: Paul T <developer.paul.123@gmail.com>
This commit is contained in:
Christoph Gross
2024-04-06 03:10:12 +02:00
committed by GitHub
parent 201f6f7657
commit bf1e3bd1f6
2 changed files with 41 additions and 25 deletions

38
lib.typ
View File

@@ -281,14 +281,21 @@
)
#block[
#align(horizon)[
#if author.phone != none [
#phone-icon
#box[#text(author.phone)]
#separator
]
#if author.email != none [
#email-icon
#box[#link("mailto:" + author.email)[#author.email]]
]
#if author.github != none [
#separator
#github-icon
#box[#link("https://github.com/" + author.github)[#author.github]]
]
#if author.linkedin != none [
#separator
#linkedin-icon
#box[
@@ -297,6 +304,7 @@
]
]
]
]
}
name
@@ -531,18 +539,26 @@
#stack(
dir: ltr,
spacing: 0.5em,
phone-icon,
box[#text(author.phone)],
separator,
email-icon,
box[#link("mailto:" + author.email)[#author.email]],
separator,
github-icon,
box[#link("https://github.com/" + author.github)[#author.github]],
separator,
linkedin-icon,
box[
if author.phone != none [
#phone-icon
#box[#text(author.phone)]
#separator
],
if author.email != none [
#email-icon
#box[#link("mailto:" + author.email)[#author.email]]
],
if author.github != none [
#separator
#github-icon
#box[#link("https://github.com/" + author.github)[#author.github]]
],
if author.linkedin != none [
#separator
#linkedin-icon
#box[
#link("https://www.linkedin.com/in/" + author.linkedin)[#author.firstname #author.lastname]
]
],
)
]

View File

@@ -16,7 +16,7 @@
),
),
date: datetime.today().display(),
colored-headers: true
colored-headers: true,
)
= Experience