diff --git a/lib.typ b/lib.typ index 62de501..cf11cba 100644 --- a/lib.typ +++ b/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") diff --git a/template/coverletter2.typ b/template/coverletter2.typ index 9fe48d1..e8ed042 100644 --- a/template/coverletter2.typ +++ b/template/coverletter2.typ @@ -14,6 +14,13 @@ "Software Engineer", "Full Stack Developer", ), + custom: ( + ( + text: "Youtube Channel", + icon: "youtube", + link: "http://example.com", + ), + ), ), profile-picture: none, language: "sp", diff --git a/template/resume.typ b/template/resume.typ index 948017b..cdb29da 100644 --- a/template/resume.typ +++ b/template/resume.typ @@ -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" // ),