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
|
||||
#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.
|
||||
/// 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.
|
||||
/// - 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
|
||||
@@ -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)[
|
||||
#set text(size: 8pt, weight: "light", style: "normal")
|
||||
|
||||
@@ -14,6 +14,13 @@
|
||||
"Software Engineer",
|
||||
"Full Stack Developer",
|
||||
),
|
||||
custom: (
|
||||
(
|
||||
text: "Youtube Channel",
|
||||
icon: "youtube",
|
||||
link: "http://example.com",
|
||||
),
|
||||
),
|
||||
),
|
||||
profile-picture: none,
|
||||
language: "sp",
|
||||
|
||||
@@ -19,6 +19,13 @@
|
||||
"Software Architect",
|
||||
"Developer",
|
||||
),
|
||||
custom: (
|
||||
(
|
||||
text: "Youtube Channel",
|
||||
icon: "youtube",
|
||||
link: "https://example.com",
|
||||
),
|
||||
),
|
||||
),
|
||||
profile-picture: image("profile.png"),
|
||||
date: datetime.today().display(),
|
||||
@@ -139,7 +146,7 @@
|
||||
// strong("Excel"),
|
||||
// "Word",
|
||||
// "Powerpoint",
|
||||
// "Visual Studio",
|
||||
// "Visual Studio",
|
||||
// "git",
|
||||
// "Zed"
|
||||
// ),
|
||||
|
||||
Reference in New Issue
Block a user