feat: Add support for custom author entry (#124)
This commit is contained in:
38
lib.typ
38
lib.typ
@@ -378,6 +378,23 @@
|
|||||||
#website-icon
|
#website-icon
|
||||||
#box[#link(author.website)[#author.website]]
|
#box[#link(author.website)[#author.website]]
|
||||||
]
|
]
|
||||||
|
#if ("custom" in author and type(author.custom) == array) [
|
||||||
|
#for item in author.custom [
|
||||||
|
#if ("text" in item) [
|
||||||
|
#separator
|
||||||
|
#if ("icon" in item) [
|
||||||
|
#box(fa-icon(item.icon, fill: color-darknight))
|
||||||
|
]
|
||||||
|
#box[
|
||||||
|
#if ("link" in item) [
|
||||||
|
#link(item.link)[#item.text]
|
||||||
|
] else [
|
||||||
|
#item.text
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
@@ -549,7 +566,7 @@
|
|||||||
|
|
||||||
/// Cover letter template that is inspired by the Awesome CV Latex template by posquit0. This template can loosely be considered a port of the original Latex template.
|
/// Cover letter template that is inspired by the Awesome CV Latex template by posquit0. This template can loosely be considered a port of the original Latex template.
|
||||||
/// This coverletter template is designed to be used with the resume template.
|
/// This coverletter template is designed to be used with the resume template.
|
||||||
/// - author (content): Structure that takes in all the author's information. The following fields are required: firstname, lastname, positions. The following fields are used if available: email, phone, github, linkedin, orcid, address, website.
|
/// - author (content): Structure that takes in all the author's information. The following fields are required: firstname, lastname, positions. The following fields are used if available: email, phone, github, linkedin, orcid, address, website, custom. The `custom` field is an array of additional entries with the following fields: text (string, required), icon (string, optional Font Awesome icon name), link (string, optional).
|
||||||
/// - profile-picture (image): The profile picture of the author. This will be cropped to a circle and should be square in nature.
|
/// - profile-picture (image): The profile picture of the author. This will be cropped to a circle and should be square in nature.
|
||||||
/// - date (datetime): The date the cover letter was created. This will default to the current date.
|
/// - date (datetime): The date the cover letter was created. This will default to the current date.
|
||||||
/// - accent-color (color): The accent color of the cover letter
|
/// - accent-color (color): The accent color of the cover letter
|
||||||
@@ -716,6 +733,25 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ("custom" in author and type(author.custom) == array) {
|
||||||
|
for item in author.custom {
|
||||||
|
if ("text" in item) {
|
||||||
|
author_list.push[
|
||||||
|
#if ("icon" in item) [
|
||||||
|
#box(fa-icon(item.icon, fill: color-darknight))
|
||||||
|
]
|
||||||
|
#box[
|
||||||
|
#if ("link" in item) [
|
||||||
|
#link(item.link)[#item.text]
|
||||||
|
] else [
|
||||||
|
#item.text
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
align(right)[
|
align(right)[
|
||||||
#set text(size: 8pt, weight: "light", style: "normal")
|
#set text(size: 8pt, weight: "light", style: "normal")
|
||||||
|
|||||||
@@ -14,6 +14,13 @@
|
|||||||
"Software Engineer",
|
"Software Engineer",
|
||||||
"Full Stack Developer",
|
"Full Stack Developer",
|
||||||
),
|
),
|
||||||
|
custom: (
|
||||||
|
(
|
||||||
|
text: "Youtube Channel",
|
||||||
|
icon: "youtube",
|
||||||
|
link: "http://example.com",
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
profile-picture: none,
|
profile-picture: none,
|
||||||
language: "sp",
|
language: "sp",
|
||||||
|
|||||||
@@ -19,6 +19,13 @@
|
|||||||
"Software Architect",
|
"Software Architect",
|
||||||
"Developer",
|
"Developer",
|
||||||
),
|
),
|
||||||
|
custom: (
|
||||||
|
(
|
||||||
|
text: "Youtube Channel",
|
||||||
|
icon: "youtube",
|
||||||
|
link: "https://example.com",
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
profile-picture: image("profile.png"),
|
profile-picture: image("profile.png"),
|
||||||
date: datetime.today().display(),
|
date: datetime.today().display(),
|
||||||
@@ -139,7 +146,7 @@
|
|||||||
// strong("Excel"),
|
// strong("Excel"),
|
||||||
// "Word",
|
// "Word",
|
||||||
// "Powerpoint",
|
// "Powerpoint",
|
||||||
// "Visual Studio",
|
// "Visual Studio",
|
||||||
// "git",
|
// "git",
|
||||||
// "Zed"
|
// "Zed"
|
||||||
// ),
|
// ),
|
||||||
|
|||||||
Reference in New Issue
Block a user