Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add ability to show/hide footer #55

Merged
merged 1 commit into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading