Skip to content

Commit

Permalink
feat: add ability to show/hide footer
Browse files Browse the repository at this point in the history
  • Loading branch information
DeveloperPaul123 committed Aug 18, 2024
1 parent d6ac41a commit 67e8c4e
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 43 deletions.
90 changes: 48 additions & 42 deletions lib.typ
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,50 @@
]
}

#let __coverletter_footer(author, language, date, lang_data) = {
set text(
fill: gray,
size: 8pt,
)
__justify_align_3[
#smallcaps[#date]
][
#smallcaps[
#if language == "zh" or language == "ja" [
#author.firstname#author.lastname
] else [
#author.firstname#sym.space#author.lastname
]
#sym.dot.c
#linguify("cover-letter", from: lang_data)
]
][
#counter(page).display()
]
}

#let __resume_footer(author, language, lang_data, date) = {
set text(
fill: gray,
size: 8pt,
)
__justify_align_3[
#smallcaps[#date]
][
#smallcaps[
#if language == "zh" or language == "ja" [
#author.firstname#author.lastname
] else [
#author.firstname#sym.space#author.lastname
]
#sym.dot.c
#linguify("resume", from: lang_data)
]
][
#counter(page).display()
]
}

/// Show a link with an icon, specifically for Github projects
/// *Example*
/// #example(`resume.github-link("DeveloperPaul123/awesome-resume")`)
Expand Down Expand Up @@ -146,6 +190,7 @@
date: datetime.today().display("[month repr:long] [day], [year]"),
accent-color: default-accent-color,
colored-headers: true,
show-footer: true,
language: "en",
font: ("Source Sans Pro", "Source Sans 3"),
body,
Expand All @@ -172,27 +217,7 @@
set page(
paper: "a4",
margin: (left: 15mm, right: 15mm, top: 10mm, bottom: 10mm),
footer: [
#set text(
fill: gray,
size: 8pt,
)
#__justify_align_3[
#smallcaps[#date]
][
#smallcaps[
#if language == "zh" or language == "ja" [
#author.firstname#author.lastname
] else [
#author.firstname#sym.space#author.lastname
]
#sym.dot.c
#linguify("resume", from: lang_data)
]
][
#counter(page).display()
]
],
footer: if show-footer [#__resume_footer(author, language, lang_data, date)] else [],
footer-descent: 0pt,
)

Expand Down Expand Up @@ -483,6 +508,7 @@
accent-color: default-accent-color,
language: "en",
font: ("Source Sans Pro", "Source Sans 3"),
show-footer: true,
body,
) = {
if type(accent-color) == "string" {
Expand All @@ -508,27 +534,7 @@
set page(
paper: "a4",
margin: (left: 15mm, right: 15mm, top: 10mm, bottom: 10mm),
footer: [
#set text(
fill: gray,
size: 8pt,
)
#__justify_align_3[
#smallcaps[#date]
][
#smallcaps[
#if language == "zh" or language == "ja" [
#author.firstname#author.lastname
] else [
#author.firstname#sym.space#author.lastname
]
#sym.dot.c
#linguify("cover-letter", from: lang_data)
]
][
#counter(page).display()
]
],
footer: if show-footer [#__coverletter_footer(author, language, date, lang_data)] else [],
footer-descent: 0pt,
)

Expand Down
3 changes: 2 additions & 1 deletion template/coverletter.typ
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
),
profile-picture: image("./profile.png"),
language: "en",
font: "Times New Roman"
font: "Times New Roman",
// show-footer: false, // Uncomment to hide footer
)

#hiring-entity-info(entity-info: (
Expand Down
1 change: 1 addition & 0 deletions template/resume.typ
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
date: datetime.today().display(),
language: "en",
colored-headers: true,
show-footer: false,
)

= Experience
Expand Down

0 comments on commit 67e8c4e

Please sign in to comment.