Skip to content

Commit

Permalink
Add cover letter prototype
Browse files Browse the repository at this point in the history
  • Loading branch information
kadykov committed Oct 25, 2024
1 parent 4b8960c commit 1c40173
Show file tree
Hide file tree
Showing 3 changed files with 131 additions and 5 deletions.
16 changes: 12 additions & 4 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
set dotenv-load
cv-name := "kadykov-cv"
letter-name := "kadykov-letter"

build:
typst compile \
kadykov-cv.typ
{{cv-name}}.typ

build-private:
typst compile \
kadykov-cv.typ \
--input EMAIL='{{env_var("EMAIL")}}' \
--input PHONE='{{env_var("PHONE")}}'
{{cv-name}}.typ \
--input EMAIL="$EMAIL" \
--input PHONE="$PHONE"

build-letter:
typst compile \
{{letter-name}}.typ \
--input EMAIL="$EMAIL" \
--input PHONE="$PHONE"
118 changes: 118 additions & 0 deletions kadykov-letter.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
#import "style.typ": *

#let name = "Aleksandr Kadykov"
#let post-name = "Research Engineer"
#let website = "www.kadykov.com"
#let github = "kadykov"
#let gitlab = "kadykov"
#let linkedin = "aleksandr-kadykov"

// Optional email input
#let email = {
if "EMAIL" in sys.inputs.keys() {sys.inputs.EMAIL}
else {"[email protected]"}
}

#let today = datetime.today()
#let suffix = {
let day = today.day()
if day == 1 or day == 21 or day == 31 { "st" }
else if day == 2 or day == 22 { "nd" }
else if day == 3 or day == 23 { "rd" }
else { "th" }
}

// Call the function from `style.typ` and pass variables to set up the document style
#show: setup-style.with(
name: name,
email: email,
website: website,
github: github,
gitlab: gitlab,
linkedin: linkedin,
)


#let from-content = [
*From*:

#name

Mons,
Belgium

#today.display(
"[month repr:long] [day]"
)#super(suffix) \
#today.year()
]
#let to-content = [
*To*:
Future Employer
Company
Street 123\
City\
00000 \
Country
]
#context {
let intro-height = calc.max(
measure(from-content).height,
measure(to-content).height,
)
box(height: intro-height)[#from-content]
h(1fr)
box(height: intro-height, width: bodywidth)[#to-content]
}
#v(1em)
#align(right)[
#block(width: bodywidth)[
#set align(left)
*Subject*:
Explainig my interest
in working in your company
#v(1em)
Dear Future Employer,
#lorem(20)
#lorem(50)
#lorem(30)
#lorem(30)
#lorem(30)
#lorem(30)
#lorem(30)
#lorem(30)
#lorem(30)
#lorem(30)
#lorem(30)
#lorem(30)
#lorem(30)
#lorem(30)
Best regards,\
#name
]
]
2 changes: 1 addition & 1 deletion style.typ
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
size: 10.5pt,
lang: "en",
fill: text-color,
hyphenate: true,
hyphenate: auto,
)

show heading: set text(
Expand Down

0 comments on commit 1c40173

Please sign in to comment.