fix: minor issues with accent color, switch to kebab-case
Fixed minor issue with accent color and switch (fully) to using kebab case. Fixes #17 Fixes #19
This commit is contained in:
74
lib.typ
74
lib.typ
@@ -54,23 +54,22 @@
|
||||
/// Show a link with an icon, specifically for Github projects
|
||||
/// *Example*
|
||||
/// #example(`resume.github-link("DeveloperPaul123/awesome-resume")`)
|
||||
/// - github_path (string): The path to the Github project (e.g. "DeveloperPaul123/awesome-resume")
|
||||
/// - github-path (string): The path to the Github project (e.g. "DeveloperPaul123/awesome-resume")
|
||||
/// -> none
|
||||
#let github-link(github_path) = {
|
||||
#let github-link(github-path) = {
|
||||
set box(height: 11pt)
|
||||
|
||||
align(right + horizon)[
|
||||
#fa-icon("github", fa-set: "Brands", fill: color-darkgray) #link(
|
||||
"https://github.com/" + github_path,
|
||||
github_path,
|
||||
"https://github.com/" + github-path,
|
||||
github-path,
|
||||
)
|
||||
]
|
||||
}
|
||||
|
||||
/// Right section for the justified headers
|
||||
/// - body (content): The body of the right header
|
||||
/// - accent_color (color): The accent color to color the text with. This defaults to the default-accent-color
|
||||
#let secondary-right-header(body, accent_color: default-accent-color) = {
|
||||
#let secondary-right-header(body) = {
|
||||
set text(
|
||||
size: 11pt,
|
||||
weight: "medium",
|
||||
@@ -125,17 +124,21 @@
|
||||
///
|
||||
/// - author (content): Structure that takes in all the author's information
|
||||
/// - date (string): The date the resume was created
|
||||
/// - accent_color (color): The accent color of the resume
|
||||
/// - colored_headers (boolean): Whether the headers should be colored or not
|
||||
/// - accent-color (color): The accent color of the resume
|
||||
/// - colored-headers (boolean): Whether the headers should be colored or not
|
||||
/// - body (content): The body of the resume
|
||||
/// -> none
|
||||
#let resume(
|
||||
author: (:),
|
||||
date: datetime.today().display("[month repr:long] [day], [year]"),
|
||||
accent_color: default-accent-color,
|
||||
colored_headers: true,
|
||||
accent-color: default-accent-color,
|
||||
colored-headers: true,
|
||||
body,
|
||||
) = {
|
||||
if type(accent-color) == "string" {
|
||||
accent-color = rgb(accent-color)
|
||||
}
|
||||
|
||||
set document(
|
||||
author: author.firstname + " " + author.lastname,
|
||||
title: "resume",
|
||||
@@ -196,8 +199,8 @@
|
||||
)
|
||||
|
||||
#align(left)[
|
||||
#let color = if colored_headers {
|
||||
accent_color
|
||||
#let color = if colored-headers {
|
||||
accent-color
|
||||
} else {
|
||||
color-darkgray
|
||||
}
|
||||
@@ -233,7 +236,7 @@
|
||||
style: "normal",
|
||||
font: ("Roboto"),
|
||||
)
|
||||
#text(accent_color, weight: "thin")[#author.firstname]
|
||||
#text(fill: accent-color, weight: "thin")[#author.firstname]
|
||||
#text(weight: "bold")[#author.lastname]
|
||||
]
|
||||
]
|
||||
@@ -242,7 +245,7 @@
|
||||
|
||||
let positions = {
|
||||
set text(
|
||||
accent_color,
|
||||
accent-color,
|
||||
size: 9pt,
|
||||
weight: "regular",
|
||||
)
|
||||
@@ -327,6 +330,7 @@
|
||||
location: "",
|
||||
date: "",
|
||||
description: "",
|
||||
accent-color: default-accent-color,
|
||||
) = {
|
||||
pad[
|
||||
#justified-header(title, location)
|
||||
@@ -389,17 +393,21 @@
|
||||
/// 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
|
||||
/// - 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 (date): The date the cover letter was created
|
||||
/// - accent_color (color): The accent color of the cover letter
|
||||
/// - accent-color (color): The accent color of the cover letter
|
||||
/// - body (content): The body of the cover letter
|
||||
#let coverletter(
|
||||
author: (:),
|
||||
profile_picture: image,
|
||||
profile-picture: image,
|
||||
date: datetime.today().display("[month repr:long] [day], [year]"),
|
||||
accent_color: default-accent-color,
|
||||
accent-color: default-accent-color,
|
||||
body,
|
||||
) = {
|
||||
if type(accent-color) == "string" {
|
||||
accent-color = rgb(accent-color)
|
||||
}
|
||||
|
||||
set document(
|
||||
author: author.firstname + " " + author.lastname,
|
||||
title: "resume",
|
||||
@@ -460,7 +468,7 @@
|
||||
)
|
||||
|
||||
#align(left)[
|
||||
#text[#strong[#text(accent_color)[#it.body.text]]]
|
||||
#text[#strong[#text(accent-color)[#it.body.text]]]
|
||||
#box(width: 1fr, line(length: 100%))
|
||||
]
|
||||
]
|
||||
@@ -474,7 +482,7 @@
|
||||
style: "normal",
|
||||
font: ("Roboto"),
|
||||
)
|
||||
#text(accent_color, weight: "thin")[#author.firstname]
|
||||
#text(accent-color, weight: "thin")[#author.firstname]
|
||||
#text(weight: "bold")[#author.lastname]
|
||||
]
|
||||
]
|
||||
@@ -483,7 +491,7 @@
|
||||
|
||||
let positions = {
|
||||
set text(
|
||||
accent_color,
|
||||
accent-color,
|
||||
size: 9pt,
|
||||
weight: "regular",
|
||||
)
|
||||
@@ -553,7 +561,7 @@
|
||||
radius: 2cm,
|
||||
width: 4cm,
|
||||
height: 4cm,
|
||||
profile_picture,
|
||||
profile-picture,
|
||||
)
|
||||
],
|
||||
[
|
||||
@@ -565,7 +573,7 @@
|
||||
)
|
||||
}
|
||||
|
||||
let letter_conclusion = {
|
||||
let letter-conclusion = {
|
||||
align(bottom)[
|
||||
#pad(bottom: 2em)[
|
||||
#text(weight: "light")[Sincerely,] \
|
||||
@@ -579,41 +587,41 @@
|
||||
letter-heading
|
||||
body
|
||||
linebreak()
|
||||
letter_conclusion
|
||||
letter-conclusion
|
||||
}
|
||||
|
||||
/// Cover letter heading that takes in the information for the hiring company and formats it properly.
|
||||
/// - entity_info (content): The information of the hiring entity including the company name, the target (who's attention to), street address, and city
|
||||
/// - entity-info (content): The information of the hiring entity including the company name, the target (who's attention to), street address, and city
|
||||
/// - date (date): The date the letter was written (defaults to the current date)
|
||||
#let hiring-entity-info(
|
||||
entity_info: (:),
|
||||
entity-info: (:),
|
||||
date: datetime.today().display("[month repr:long] [day], [year]"),
|
||||
) = {
|
||||
set par(leading: 1em)
|
||||
pad(top: 1.5em, bottom: 1.5em)[
|
||||
#__justify_align[
|
||||
#text(weight: "bold", size: 12pt)[#entity_info.target]
|
||||
#text(weight: "bold", size: 12pt)[#entity-info.target]
|
||||
][
|
||||
#text(weight: "light", style: "italic", size: 9pt)[#date]
|
||||
]
|
||||
|
||||
#pad(top: 0.65em, bottom: 0.65em)[
|
||||
#text(weight: "regular", fill: color-gray, size: 9pt)[
|
||||
#smallcaps[#entity_info.name] \
|
||||
#entity_info.street_address \
|
||||
#entity_info.city \
|
||||
#smallcaps[#entity-info.name] \
|
||||
#entity-info.street-address \
|
||||
#entity-info.city \
|
||||
]
|
||||
]
|
||||
]
|
||||
}
|
||||
|
||||
/// Letter heading for a given job position and addressee.
|
||||
/// - job_position (string): The job position you are applying for
|
||||
/// - job-position (string): The job position you are applying for
|
||||
/// - addressee (string): The person you are addressing the letter to
|
||||
#let letter-heading(job_position: "", addressee: "") = {
|
||||
#let letter-heading(job-position: "", addressee: "") = {
|
||||
// TODO: Make this adaptable to content
|
||||
underline(evade: false, stroke: 0.5pt, offset: 0.3em)[
|
||||
#text(weight: "bold", size: 12pt)[Job Application for #job_position]
|
||||
#text(weight: "bold", size: 12pt)[Job Application for #job-position]
|
||||
]
|
||||
pad(top: 1em, bottom: 1em)[
|
||||
#text(weight: "light", fill: color-gray)[
|
||||
|
||||
Reference in New Issue
Block a user