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

fix(letter): correct footer function and re-add header #74

Merged
merged 1 commit into from
Nov 2, 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
6 changes: 3 additions & 3 deletions letter.typ
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#import "./utils/styles.typ": *

#let letterHeader(
#let _letterHeader(
myAddress: "Your Address Here",
recipientName: "Company Name Here",
recipientAddress: "Company Address Here",
Expand Down Expand Up @@ -45,13 +45,13 @@
linebreak()
}

#let letterSignature(img) = {
#let _letterSignature(img) = {
set image(width: 25%)
linebreak()
place(right, dx: -5%, dy: 0%, img)
}

#let letterFooter(metadata) = {
#let _letterFooter(metadata) = {
// Parameters
let firstName = metadata.personal.first_name
let lastName = metadata.personal.last_name
Expand Down
13 changes: 7 additions & 6 deletions lib.typ
Original file line number Diff line number Diff line change
Expand Up @@ -64,21 +64,22 @@
set page(
paper: "a4",
margin: (left: 1.4cm, right: 1.4cm, top: 1cm, bottom: 1cm),
footer: letterHeader(
footer: _letterFooter(metadata),
)
set text(size: 12pt)

_letterHeader(
myAddress: myAddress,
recipientName: recipientName,
recipientAddress: recipientAddress,
date: date,
subject: subject,
metadata: metadata,
awesomeColors: awesomeColors,
),
)
set text(size: 12pt)

)
doc

if signature != "" {
letterSignature(signature)
_letterSignature(signature)
}
}