fix: use kebab-case and fallback for fonts

This commit is contained in:
Paul Tsouchlos
2024-03-26 09:00:22 -04:00
parent ccf77d1229
commit b0e7779b6a
3 changed files with 73 additions and 73 deletions

104
lib.typ
View File

@@ -1,17 +1,17 @@
#import "@preview/fontawesome:0.1.0": * #import "@preview/fontawesome:0.1.0": *
// const color // const color
#let color_darknight = rgb("131A28") #let color-darknight = rgb("131A28")
#let color_darkgray = rgb("414141") #let color-darkgray = rgb("414141")
#let color_gray = rgb("5d5d5d") #let color-gray = rgb("5d5d5d")
#let default_accent_color = rgb("333ECC") #let default-accent-color = rgb("333ECC")
// const icons // const icons
#let linkedin_icon = box(fa-icon("linkedin", fa-set: "Brands", fill: color_darknight)) #let linkedin-icon = box(fa-icon("linkedin", fa-set: "Brands", fill: color-darknight))
#let github_icon = box(fa-icon("github", fa-set: "Brands", fill: color_darknight)) #let github-icon = box(fa-icon("github", fa-set: "Brands", fill: color-darknight))
// for some reason this icon doesn't work with fa-icon, so we use the local version // for some reason this icon doesn't work with fa-icon, so we use the local version
#let phone_icon = box(image("assets/icons/square-phone-solid.svg")) #let phone-icon = box(image("assets/icons/square-phone-solid.svg"))
#let email_icon = box(fa-icon("envelope", fill: color_darknight)) #let email-icon = box(fa-icon("envelope", fill: color-darknight))
/// Helpers /// Helpers
@@ -49,28 +49,28 @@
/// Show a link with an icon, specifically for Github projects /// Show a link with an icon, specifically for Github projects
/// *Example* /// *Example*
/// #example(`resume.github_link("DeveloperPaul123/awesome-resume")`) /// #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 /// -> none
#let github_link(github_path) = { #let github-link(github_path) = {
set box(height: 11pt) set box(height: 11pt)
align(right + horizon)[ align(right + horizon)[
#fa-icon("github", fa-set: "Brands", fill: color_darkgray) #link("https://github.com/" + github_path, github_path) #fa-icon("github", fa-set: "Brands", fill: color-darkgray) #link("https://github.com/" + github_path, github_path)
] ]
} }
/// Right section for the justified headers /// Right section for the justified headers
/// - body (content): The body of the right header /// - 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 /// - 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, accent_color: default-accent-color) = {
set text(accent_color, size: 11pt, style: "italic", weight: "light") set text(accent_color, size: 11pt, style: "italic", weight: "light")
body body
} }
/// Right section of a tertiaty headers. /// Right section of a tertiaty headers.
/// - body (content): The body of the right header /// - body (content): The body of the right header
#let tertiary_right_header(body) = { #let tertiary-right-header(body) = {
set text(weight: "light", style: "italic", size: 9pt) set text(weight: "light", style: "italic", size: 9pt)
body body
} }
@@ -78,25 +78,25 @@
/// Justified header that takes a primary section and a secondary section. The primary section is on the left and the secondary section is on the right. /// Justified header that takes a primary section and a secondary section. The primary section is on the left and the secondary section is on the right.
/// - primary (content): The primary section of the header /// - primary (content): The primary section of the header
/// - secondary (content): The secondary section of the header /// - secondary (content): The secondary section of the header
#let justified_header(primary, secondary) = { #let justified-header(primary, secondary) = {
set block(above: 0.7em, below: 0.7em) set block(above: 0.7em, below: 0.7em)
pad[ pad[
#__justify_align[ #__justify_align[
== #primary == #primary
][ ][
#secondary_right_header[#secondary] #secondary-right-header[#secondary]
] ]
] ]
} }
/// Justified header that takes a primary section and a secondary section. The primary section is on the left and the secondary section is on the right. This is a smaller header compared to the `justified_header`. /// Justified header that takes a primary section and a secondary section. The primary section is on the left and the secondary section is on the right. This is a smaller header compared to the `justified-header`.
/// - primary (content): The primary section of the header /// - primary (content): The primary section of the header
/// - secondary (content): The secondary section of the header /// - secondary (content): The secondary section of the header
#let secondary_justified_header(primary, secondary) = { #let secondary-justified-header(primary, secondary) = {
__justify_align[ __justify_align[
=== #primary === #primary
][ ][
#tertiary_right_header[#secondary] #tertiary-right-header[#secondary]
] ]
} }
/// --- End of Helpers /// --- End of Helpers
@@ -115,7 +115,7 @@
#let resume( #let resume(
author: (:), author: (:),
date: datetime.today().display("[month repr:long] [day], [year]"), date: datetime.today().display("[month repr:long] [day], [year]"),
accent_color: default_accent_color, accent_color: default-accent-color,
body) = { body) = {
set document( set document(
author: author.firstname + " " + author.lastname, author: author.firstname + " " + author.lastname,
@@ -126,8 +126,8 @@
font: ("Source Sans Pro"), font: ("Source Sans Pro"),
lang: "en", lang: "en",
size: 11pt, size: 11pt,
fill: color_darkgray, fill: color-darkgray,
fallback: false fallback: true
) )
set page( set page(
@@ -174,7 +174,7 @@
] ]
show heading.where(level: 2): it => { show heading.where(level: 2): it => {
set text(color_darkgray, size: 12pt, style: "normal", weight: "bold") set text(color-darkgray, size: 12pt, style: "normal", weight: "bold")
it.body it.body
} }
@@ -230,16 +230,16 @@
#set text(size: 9pt, weight: "regular", style: "normal") #set text(size: 9pt, weight: "regular", style: "normal")
#block[ #block[
#align(horizon)[ #align(horizon)[
#phone_icon #phone-icon
#box[#text(author.phone)] #box[#text(author.phone)]
#separator #separator
#email_icon #email-icon
#box[#link("mailto:" + author.email)[#author.email]] #box[#link("mailto:" + author.email)[#author.email]]
#separator #separator
#github_icon #github-icon
#box[#link("https://github.com/" + author.github)[#author.github]] #box[#link("https://github.com/" + author.github)[#author.github]]
#separator #separator
#linkedin_icon #linkedin-icon
#box[ #box[
#link("https://www.linkedin.com/in/" + author.linkedin)[#author.firstname #author.lastname] #link("https://www.linkedin.com/in/" + author.linkedin)[#author.firstname #author.lastname]
] ]
@@ -258,7 +258,7 @@
/// The base item for resume entries. /// The base item for resume entries.
/// This formats the item for the resume entries. Typically your body would be a bullet list of items. Could be your responsibilities at a company or your academic achievements in an educational background section. /// This formats the item for the resume entries. Typically your body would be a bullet list of items. Could be your responsibilities at a company or your academic achievements in an educational background section.
/// - body (content): The body of the resume entry /// - body (content): The body of the resume entry
#let resume_item(body) = { #let resume-item(body) = {
set text(size: 10pt, style: "normal", weight: "light") set text(size: 10pt, style: "normal", weight: "light")
set par(leading: 0.65em) set par(leading: 0.65em)
body body
@@ -269,39 +269,39 @@
/// - location (string): The location of the resume entry /// - location (string): The location of the resume entry
/// - date (string): The date of the resume entry, this can be a range (e.g. "Jan 2020 - Dec 2020") /// - date (string): The date of the resume entry, this can be a range (e.g. "Jan 2020 - Dec 2020")
/// - description (content): The body of the resume entry /// - description (content): The body of the resume entry
#let resume_entry( #let resume-entry(
title: none, title: none,
location: "", location: "",
date: "", date: "",
description: "" description: ""
) = { ) = {
pad[ pad[
#justified_header(title, location) #justified-header(title, location)
#secondary_justified_header(description, date) #secondary-justified-header(description, date)
] ]
} }
/// Show cumulative GPA. /// Show cumulative GPA.
/// *Example:* /// *Example:*
/// #example(`resume.resume_gpa("3.5", "4.0")`) /// #example(`resume.resume-gpa("3.5", "4.0")`)
#let resume_gpa(numerator, denominator) = { #let resume-gpa(numerator, denominator) = {
set text(size: 12pt, style: "italic", weight: "light") set text(size: 12pt, style: "italic", weight: "light")
text[Cumulative GPA: #box[#strong[#numerator] / #denominator]] text[Cumulative GPA: #box[#strong[#numerator] / #denominator]]
} }
/// Show a certification in the resume. /// Show a certification in the resume.
/// *Example:* /// *Example:*
/// #example(`resume.resume_certification("AWS Certified Solutions Architect - Associate", "Jan 2020")`) /// #example(`resume.resume-certification("AWS Certified Solutions Architect - Associate", "Jan 2020")`)
/// - certification (content): The certification /// - certification (content): The certification
/// - date (content): The date the certification was achieved /// - date (content): The date the certification was achieved
#let resume_certification(certification, date) = { #let resume-certification(certification, date) = {
justified_header(certification, date) justified-header(certification, date)
} }
/// Show a list of skills in the resume under a given category. /// Show a list of skills in the resume under a given category.
/// - category (string): The category of the skills /// - category (string): The category of the skills
/// - items (list): The list of skills. This can be a list of strings but you can also emphasize certain skills by using the `strong` function. /// - items (list): The list of skills. This can be a list of strings but you can also emphasize certain skills by using the `strong` function.
#let resume_skill_item(category, items) = { #let resume-skill-item(category, items) = {
set block(below: 0.65em) set block(below: 0.65em)
set pad(top: 2pt) set pad(top: 2pt)
@@ -336,7 +336,7 @@
author: (:), author: (:),
profile_picture: image, profile_picture: image,
date: datetime.today().display("[month repr:long] [day], [year]"), date: datetime.today().display("[month repr:long] [day], [year]"),
accent_color: default_accent_color, accent_color: default-accent-color,
body body
) = { ) = {
set document( set document(
@@ -348,8 +348,8 @@
font: ("Source Sans Pro"), font: ("Source Sans Pro"),
lang: "en", lang: "en",
size: 11pt, size: 11pt,
fill: color_darkgray, fill: color-darkgray,
fallback: false fallback: true
) )
set page( set page(
@@ -427,7 +427,7 @@
size: 9pt, size: 9pt,
weight: "regular", weight: "regular",
style: "italic", style: "italic",
fill: color_gray fill: color-gray
) )
align(right)[ align(right)[
#author.address #author.address
@@ -444,16 +444,16 @@
#block[ #block[
#align(horizon)[ #align(horizon)[
#stack(dir: ltr, spacing: 0.5em, #stack(dir: ltr, spacing: 0.5em,
phone_icon, phone-icon,
box[#text(author.phone)], box[#text(author.phone)],
separator, separator,
email_icon, email-icon,
box[#link("mailto:" + author.email)[#author.email]], box[#link("mailto:" + author.email)[#author.email]],
separator, separator,
github_icon, github-icon,
box[#link("https://github.com/" + author.github)[#author.github]], box[#link("https://github.com/" + author.github)[#author.github]],
separator, separator,
linkedin_icon, linkedin-icon,
box[ box[
#link("https://www.linkedin.com/in/" + author.linkedin)[#author.firstname #author.lastname] #link("https://www.linkedin.com/in/" + author.linkedin)[#author.firstname #author.lastname]
] ]
@@ -463,7 +463,7 @@
] ]
} }
let letter_heading = { let letter-heading = {
grid(columns: (1fr, 2fr), grid(columns: (1fr, 2fr),
rows: (100pt), rows: (100pt),
align(left+horizon)[ align(left+horizon)[
@@ -490,7 +490,7 @@
} }
// actual content // actual content
letter_heading letter-heading
body body
linebreak() linebreak()
letter_conclusion letter_conclusion
@@ -499,7 +499,7 @@
/// Cover letter heading that takes in the information for the hiring company and formats it properly. /// 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) /// - date (date): The date the letter was written (defaults to the current date)
#let hiring_entity_info(entity_info: (:), date: datetime.today().display("[month repr:long] [day], [year]")) = { #let hiring-entity-info(entity_info: (:), date: datetime.today().display("[month repr:long] [day], [year]")) = {
set par(leading: 1em) set par(leading: 1em)
pad(top: 1.5em, bottom: 1.5em)[ pad(top: 1.5em, bottom: 1.5em)[
#__justify_align[ #__justify_align[
@@ -509,7 +509,7 @@
] ]
#pad(top: 0.65em, bottom: 0.65em)[ #pad(top: 0.65em, bottom: 0.65em)[
#text(weight: "regular", fill: color_gray, size: 9pt)[ #text(weight: "regular", fill: color-gray, size: 9pt)[
#smallcaps[#entity_info.name] \ #smallcaps[#entity_info.name] \
#entity_info.street_address \ #entity_info.street_address \
#entity_info.city \ #entity_info.city \
@@ -521,13 +521,13 @@
/// Letter heading for a given job position and addressee. /// 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 /// - 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 // TODO: Make this adaptable to content
underline(evade: false, stroke: 0.5pt, offset: 0.3em)[ 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)[ pad(top: 1em, bottom: 1em)[
#text(weight: "light", fill: color_gray)[ #text(weight: "light", fill: color-gray)[
Dear #addressee, Dear #addressee,
] ]
] ]
@@ -535,7 +535,7 @@
/// Cover letter content paragraph. This is the main content of the cover letter. /// Cover letter content paragraph. This is the main content of the cover letter.
/// - content (content): The content of the cover letter /// - content (content): The content of the cover letter
#let coverletter_content(content) = { #let coverletter-content(content) = {
pad(top: 1em, bottom: 1em)[ pad(top: 1em, bottom: 1em)[
#set par(first-line-indent: 3em) #set par(first-line-indent: 3em)
#set text(weight: "light") #set text(weight: "light")

View File

@@ -17,7 +17,7 @@
profile_picture: image("./profile.png") profile_picture: image("./profile.png")
) )
#hiring_entity_info( #hiring-entity-info(
entity_info: ( entity_info: (
target: "Company Recruitement Team", target: "Company Recruitement Team",
name: "Google, Inc.", name: "Google, Inc.",
@@ -26,22 +26,22 @@
) )
) )
#letter_heading( #letter-heading(
job_position: "Software Engineer", job_position: "Software Engineer",
addressee: "Sir or Madame" addressee: "Sir or Madame"
) )
= About Me = About Me
#coverletter_content[ #coverletter-content[
#lorem(80) #lorem(80)
] ]
= Why Google? = Why Google?
#coverletter_content[ #coverletter-content[
#lorem(90) #lorem(90)
] ]
= Why Me? = Why Me?
#coverletter_content[ #coverletter-content[
#lorem(100) #lorem(100)
] ]

View File

@@ -19,14 +19,14 @@
= Education = Education
#resume_entry( #resume-entry(
title: "Example University", title: "Example University",
location: "B.S. in Computer Science", location: "B.S. in Computer Science",
date: "August 2014 - May 2019", date: "August 2014 - May 2019",
description: "Example" description: "Example"
) )
#resume_item[ #resume-item[
- #lorem(20) - #lorem(20)
- #lorem(15) - #lorem(15)
- #lorem(25) - #lorem(25)
@@ -34,27 +34,27 @@
= Experience = Experience
#resume_entry( #resume-entry(
title: "Example, Inc.", title: "Example, Inc.",
location: "Example City, EX", location: "Example City, EX",
date: "2019 - Present", date: "2019 - Present",
description: "Senior Software Engineer" description: "Senior Software Engineer"
) )
#resume_item[ #resume-item[
- #lorem(20) - #lorem(20)
- #lorem(15) - #lorem(15)
- #lorem(25) - #lorem(25)
] ]
#resume_entry( #resume-entry(
title: "Previous Company, Inc.", title: "Previous Company, Inc.",
location: "Example City, EX", location: "Example City, EX",
date: "2011 - 2019", date: "2011 - 2019",
description: "Software Engineer" description: "Software Engineer"
) )
#resume_item[ #resume-item[
- #lorem(20) - #lorem(20)
- #lorem(15) - #lorem(15)
- #lorem(25) - #lorem(25)
@@ -62,32 +62,32 @@
= Projects = Projects
#resume_entry( #resume-entry(
title: "Thread Pool C++ Library", title: "Thread Pool C++ Library",
location: [#github_link("DeveloperPaul123/thread-pool")], location: [#github-link("DeveloperPaul123/thread-pool")],
date: "May 2021 - Present", date: "May 2021 - Present",
description: "Designer/Developer" description: "Designer/Developer"
) )
#resume_item[ #resume-item[
- Designed and implemented a thread pool library in C++ using the latest C++20 and C++23 features. - Designed and implemented a thread pool library in C++ using the latest C++20 and C++23 features.
- Wrote extensive documentation and unit tests for the library and published it on Github. - Wrote extensive documentation and unit tests for the library and published it on Github.
] ]
#resume_entry( #resume-entry(
title: " Event Bus C++ Library", title: " Event Bus C++ Library",
location: github_link("DeveloperPaul123/eventbus"), location: github-link("DeveloperPaul123/eventbus"),
date: "Sep. 2019 - Present", date: "Sep. 2019 - Present",
description: "Designer/Developer" description: "Designer/Developer"
) )
#resume_item[ #resume-item[
- Designed and implemented an event bus library using C++17. - Designed and implemented an event bus library using C++17.
- Wrote detailed documentation and unit tests for the library and published it on Github. - Wrote detailed documentation and unit tests for the library and published it on Github.
] ]
= Skills = Skills
#resume_skill_item("Programming Languages", (strong("C++"), "Python", "Java", "C#", "JavaScript", "TypeScript")) #resume-skill-item("Programming Languages", (strong("C++"), "Python", "Java", "C#", "JavaScript", "TypeScript"))
#resume_skill_item("Spoken Languages", (strong("English"), "Spanish")) #resume-skill-item("Spoken Languages", (strong("English"), "Spanish"))
#resume_skill_item("Programs", (strong("Excel"),"Word")) #resume-skill-item("Programs", (strong("Excel"),"Word"))