feat: make address optional
Also improved how other fields in the `author` dictionary are checked so they can be omitted completely if the user so chooses. Currently they must be left empty to be omitted.
This commit is contained in:
20
lib.typ
20
lib.typ
@@ -269,8 +269,10 @@
|
||||
weight: "bold",
|
||||
)
|
||||
align(center)[
|
||||
#if ("address" in author) [
|
||||
#author.address
|
||||
]
|
||||
]
|
||||
}
|
||||
|
||||
let contacts = {
|
||||
@@ -286,21 +288,21 @@
|
||||
)
|
||||
#block[
|
||||
#align(horizon)[
|
||||
#if author.phone != none [
|
||||
#if ("phone" in author) [
|
||||
#phone-icon
|
||||
#box[#text(author.phone)]
|
||||
#separator
|
||||
]
|
||||
#if author.email != none [
|
||||
#if ("email" in author) [
|
||||
#email-icon
|
||||
#box[#link("mailto:" + author.email)[#author.email]]
|
||||
]
|
||||
#if author.github != none [
|
||||
#if ("github" in author) [
|
||||
#separator
|
||||
#github-icon
|
||||
#box[#link("https://github.com/" + author.github)[#author.github]]
|
||||
]
|
||||
#if author.linkedin != none [
|
||||
#if ("linkedin" in author) [
|
||||
#separator
|
||||
#linkedin-icon
|
||||
#box[
|
||||
@@ -528,8 +530,10 @@
|
||||
fill: color-gray,
|
||||
)
|
||||
align(right)[
|
||||
#if ("address" in author) [
|
||||
#author.address
|
||||
]
|
||||
]
|
||||
}
|
||||
|
||||
let contacts = {
|
||||
@@ -548,21 +552,21 @@
|
||||
#stack(
|
||||
dir: ltr,
|
||||
spacing: 0.5em,
|
||||
if author.phone != none [
|
||||
if ("phone" in author) [
|
||||
#phone-icon
|
||||
#box[#text(author.phone)]
|
||||
#separator
|
||||
],
|
||||
if author.email != none [
|
||||
if ("email" in author) [
|
||||
#email-icon
|
||||
#box[#link("mailto:" + author.email)[#author.email]]
|
||||
],
|
||||
if author.github != none [
|
||||
if ("github" in author) [
|
||||
#separator
|
||||
#github-icon
|
||||
#box[#link("https://github.com/" + author.github)[#author.github]]
|
||||
],
|
||||
if author.linkedin != none [
|
||||
if ("linkedin" in author) [
|
||||
#separator
|
||||
#linkedin-icon
|
||||
#box[
|
||||
|
||||
Reference in New Issue
Block a user