feat: update template design & add cover letter option
This commit is contained in:
		
							parent
							
								
									8f783151ef
								
							
						
					
					
						commit
						22b73648d5
					
				
					 3 changed files with 153 additions and 37 deletions
				
			
		| 
						 | 
					@ -39,7 +39,9 @@
 | 
				
			||||||
          typstSource = "src/main.typ";
 | 
					          typstSource = "src/main.typ";
 | 
				
			||||||
          typstOutput = "out/main.pdf";
 | 
					          typstOutput = "out/main.pdf";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          fontPaths = [ ];
 | 
					          fontPaths = [
 | 
				
			||||||
 | 
					            "${pkgs.work-sans}/share/fonts/opentype"
 | 
				
			||||||
 | 
					          ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          virtualPaths = [ ];
 | 
					          virtualPaths = [ ];
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										168
									
								
								src/lib/main.typ
									
										
									
									
									
								
							
							
						
						
									
										168
									
								
								src/lib/main.typ
									
										
									
									
									
								
							| 
						 | 
					@ -1,22 +1,18 @@
 | 
				
			||||||
#import "@preview/scienceicons:0.0.6": orcid-icon
 | 
					#import "@preview/scienceicons:0.0.6": (
 | 
				
			||||||
 | 
					  email-icon,
 | 
				
			||||||
 | 
					  github-icon,
 | 
				
			||||||
 | 
					  linkedin-icon,
 | 
				
			||||||
 | 
					  orcid-icon,
 | 
				
			||||||
 | 
					  website-icon,
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// based on https://github.com/stuxf/basic-typst-resume-template
 | 
					// based on https://github.com/stuxf/basic-typst-resume-template
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#let resume(
 | 
					#let common-doc(
 | 
				
			||||||
  author: "",
 | 
					  author: "",
 | 
				
			||||||
  author-position: left,
 | 
					  font: "Work Sans",
 | 
				
			||||||
  personal-info-position: left,
 | 
					 | 
				
			||||||
  pronouns: "",
 | 
					 | 
				
			||||||
  location: "",
 | 
					 | 
				
			||||||
  email: "",
 | 
					 | 
				
			||||||
  github: "",
 | 
					 | 
				
			||||||
  linkedin: "",
 | 
					 | 
				
			||||||
  phone: "",
 | 
					 | 
				
			||||||
  personal-site: "",
 | 
					 | 
				
			||||||
  orcid: "",
 | 
					 | 
				
			||||||
  accent-color: "#000000",
 | 
					 | 
				
			||||||
  font: "New Computer Modern",
 | 
					 | 
				
			||||||
  paper: "a4",
 | 
					  paper: "a4",
 | 
				
			||||||
 | 
					  accent-color: "#000000",
 | 
				
			||||||
  body,
 | 
					  body,
 | 
				
			||||||
) = {
 | 
					) = {
 | 
				
			||||||
  // Sets document metadata
 | 
					  // Sets document metadata
 | 
				
			||||||
| 
						 | 
					@ -54,7 +50,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Name will be aligned left, bold and big
 | 
					  // Name will be aligned left, bold and big
 | 
				
			||||||
  show heading.where(level: 1): it => [
 | 
					  show heading.where(level: 1): it => [
 | 
				
			||||||
    #set align(author-position)
 | 
					    #set align(left)
 | 
				
			||||||
    #set text(
 | 
					    #set text(
 | 
				
			||||||
      weight: 700,
 | 
					      weight: 700,
 | 
				
			||||||
      size: 20pt,
 | 
					      size: 20pt,
 | 
				
			||||||
| 
						 | 
					@ -62,12 +58,15 @@
 | 
				
			||||||
    #pad(it.body)
 | 
					    #pad(it.body)
 | 
				
			||||||
  ]
 | 
					  ]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Level 1 Heading
 | 
					  body
 | 
				
			||||||
  [= #(author)]
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Personal Info Helper
 | 
					// Personal Info Helper
 | 
				
			||||||
  let contact-item(value, prefix: "", link-type: "") = {
 | 
					#let contact-item(value, icon: "", prefix: "", link-type: "") = {
 | 
				
			||||||
  if value != "" {
 | 
					  if value != "" {
 | 
				
			||||||
 | 
					    if icon != "" {
 | 
				
			||||||
 | 
					      icon + " "
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
    if link-type != "" {
 | 
					    if link-type != "" {
 | 
				
			||||||
      link(link-type + value)[#(prefix + value)]
 | 
					      link(link-type + value)[#(prefix + value)]
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
| 
						 | 
					@ -77,28 +76,96 @@
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Personal Info
 | 
					// Personal Info
 | 
				
			||||||
 | 
					#let personal-info(
 | 
				
			||||||
 | 
					  position: left,
 | 
				
			||||||
 | 
					  with-icons: false,
 | 
				
			||||||
 | 
					  separator: " | ",
 | 
				
			||||||
 | 
					  pronouns: "",
 | 
				
			||||||
 | 
					  phone: "",
 | 
				
			||||||
 | 
					  location: "",
 | 
				
			||||||
 | 
					  email: "",
 | 
				
			||||||
 | 
					  github: "",
 | 
				
			||||||
 | 
					  linkedin: "",
 | 
				
			||||||
 | 
					  personal-site: "",
 | 
				
			||||||
 | 
					  orcid: "",
 | 
				
			||||||
 | 
					) = {
 | 
				
			||||||
  pad(
 | 
					  pad(
 | 
				
			||||||
    top: 0.25em,
 | 
					    top: 0.25em,
 | 
				
			||||||
    align(personal-info-position)[
 | 
					    align(position)[
 | 
				
			||||||
      #{
 | 
					      #{
 | 
				
			||||||
        let items = (
 | 
					        let items = (
 | 
				
			||||||
          contact-item(pronouns),
 | 
					          contact-item(pronouns),
 | 
				
			||||||
          contact-item(phone),
 | 
					          contact-item(phone),
 | 
				
			||||||
          contact-item(location),
 | 
					          contact-item(location),
 | 
				
			||||||
          contact-item(email, link-type: "mailto:"),
 | 
					          contact-item(
 | 
				
			||||||
          contact-item(github, link-type: "https://"),
 | 
					            email,
 | 
				
			||||||
          contact-item(linkedin, link-type: "https://"),
 | 
					            icon: if with-icons { email-icon() } else { "" },
 | 
				
			||||||
          contact-item(personal-site, link-type: "https://"),
 | 
					            link-type: "mailto:",
 | 
				
			||||||
 | 
					          ),
 | 
				
			||||||
 | 
					          contact-item(
 | 
				
			||||||
 | 
					            github,
 | 
				
			||||||
 | 
					            icon: if with-icons { github-icon() } else { "" },
 | 
				
			||||||
 | 
					            link-type: "https://",
 | 
				
			||||||
 | 
					          ),
 | 
				
			||||||
 | 
					          contact-item(
 | 
				
			||||||
 | 
					            linkedin,
 | 
				
			||||||
 | 
					            icon: if with-icons { linkedin-icon() } else { "" },
 | 
				
			||||||
 | 
					            link-type: "https://",
 | 
				
			||||||
 | 
					          ),
 | 
				
			||||||
 | 
					          contact-item(
 | 
				
			||||||
 | 
					            personal-site,
 | 
				
			||||||
 | 
					            icon: if with-icons { website-icon() } else { "" },
 | 
				
			||||||
 | 
					            link-type: "https://",
 | 
				
			||||||
 | 
					          ),
 | 
				
			||||||
          contact-item(
 | 
					          contact-item(
 | 
				
			||||||
            orcid,
 | 
					            orcid,
 | 
				
			||||||
            prefix: [#orcid-icon(color: rgb("#AECD54"))orcid.org/],
 | 
					            icon: orcid-icon(color: rgb("#AECD54")),
 | 
				
			||||||
 | 
					            prefix: "orcid.org/",
 | 
				
			||||||
            link-type: "https://orcid.org/",
 | 
					            link-type: "https://orcid.org/",
 | 
				
			||||||
          ),
 | 
					          ),
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
        items.filter(x => x != none).join("  |  ")
 | 
					        items.filter(x => x != none).join(separator)
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    ],
 | 
					    ],
 | 
				
			||||||
  )
 | 
					  )
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#let resume(
 | 
				
			||||||
 | 
					  author: "",
 | 
				
			||||||
 | 
					  pronouns: "",
 | 
				
			||||||
 | 
					  location: "",
 | 
				
			||||||
 | 
					  email: "",
 | 
				
			||||||
 | 
					  github: "",
 | 
				
			||||||
 | 
					  linkedin: "",
 | 
				
			||||||
 | 
					  phone: "",
 | 
				
			||||||
 | 
					  personal-site: "",
 | 
				
			||||||
 | 
					  orcid: "",
 | 
				
			||||||
 | 
					  accent-color: "#000000",
 | 
				
			||||||
 | 
					  font: "Work Sans",
 | 
				
			||||||
 | 
					  paper: "a4",
 | 
				
			||||||
 | 
					  body,
 | 
				
			||||||
 | 
					) = {
 | 
				
			||||||
 | 
					  show: common-doc.with(
 | 
				
			||||||
 | 
					    author: author,
 | 
				
			||||||
 | 
					    font: font,
 | 
				
			||||||
 | 
					    paper: paper,
 | 
				
			||||||
 | 
					    accent-color: accent-color,
 | 
				
			||||||
 | 
					  )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // Level 1 Heading
 | 
				
			||||||
 | 
					  [= #(author)]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  personal-info(
 | 
				
			||||||
 | 
					    position: left,
 | 
				
			||||||
 | 
					    pronouns: pronouns,
 | 
				
			||||||
 | 
					    location: location,
 | 
				
			||||||
 | 
					    email: email,
 | 
				
			||||||
 | 
					    phone: phone,
 | 
				
			||||||
 | 
					    github: github,
 | 
				
			||||||
 | 
					    linkedin: linkedin,
 | 
				
			||||||
 | 
					    personal-site: personal-site,
 | 
				
			||||||
 | 
					    orcid: orcid,
 | 
				
			||||||
 | 
					  )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Main body.
 | 
					  // Main body.
 | 
				
			||||||
  set par(justify: true)
 | 
					  set par(justify: true)
 | 
				
			||||||
| 
						 | 
					@ -106,6 +173,55 @@
 | 
				
			||||||
  body
 | 
					  body
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#let cover-letter(
 | 
				
			||||||
 | 
					  author: "",
 | 
				
			||||||
 | 
					  title: "",
 | 
				
			||||||
 | 
					  pronouns: "",
 | 
				
			||||||
 | 
					  location: "",
 | 
				
			||||||
 | 
					  email: "",
 | 
				
			||||||
 | 
					  github: "",
 | 
				
			||||||
 | 
					  linkedin: "",
 | 
				
			||||||
 | 
					  phone: "",
 | 
				
			||||||
 | 
					  personal-site: "",
 | 
				
			||||||
 | 
					  orcid: "",
 | 
				
			||||||
 | 
					  accent-color: "#000000",
 | 
				
			||||||
 | 
					  font: "Work Sans",
 | 
				
			||||||
 | 
					  paper: "a4",
 | 
				
			||||||
 | 
					  body,
 | 
				
			||||||
 | 
					) = {
 | 
				
			||||||
 | 
					  show: common-doc.with(
 | 
				
			||||||
 | 
					    author: author,
 | 
				
			||||||
 | 
					    font: font,
 | 
				
			||||||
 | 
					    paper: paper,
 | 
				
			||||||
 | 
					    accent-color: accent-color,
 | 
				
			||||||
 | 
					  )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  grid(
 | 
				
			||||||
 | 
					    columns: (70%, auto),
 | 
				
			||||||
 | 
					    [
 | 
				
			||||||
 | 
					      #[= #(author)]
 | 
				
			||||||
 | 
					      #if (title != "") {
 | 
				
			||||||
 | 
					        [#text(title, fill: rgb(accent-color), size: 12pt)]
 | 
				
			||||||
 | 
					      } \
 | 
				
			||||||
 | 
					      #location
 | 
				
			||||||
 | 
					    ],
 | 
				
			||||||
 | 
					    personal-info(
 | 
				
			||||||
 | 
					      with-icons: true,
 | 
				
			||||||
 | 
					      position: left,
 | 
				
			||||||
 | 
					      separator: "\n",
 | 
				
			||||||
 | 
					      pronouns: pronouns,
 | 
				
			||||||
 | 
					      email: email,
 | 
				
			||||||
 | 
					      phone: phone,
 | 
				
			||||||
 | 
					      github: github,
 | 
				
			||||||
 | 
					      linkedin: linkedin,
 | 
				
			||||||
 | 
					      personal-site: personal-site,
 | 
				
			||||||
 | 
					      orcid: orcid,
 | 
				
			||||||
 | 
					    ),
 | 
				
			||||||
 | 
					  )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  body
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Generic two by two component for resume
 | 
					// Generic two by two component for resume
 | 
				
			||||||
#let generic-two-by-two(
 | 
					#let generic-two-by-two(
 | 
				
			||||||
  top-left: "",
 | 
					  top-left: "",
 | 
				
			||||||
| 
						 | 
					@ -162,7 +278,7 @@
 | 
				
			||||||
  generic-two-by-two(
 | 
					  generic-two-by-two(
 | 
				
			||||||
    top-left: strong(title),
 | 
					    top-left: strong(title),
 | 
				
			||||||
    top-right: dates,
 | 
					    top-right: dates,
 | 
				
			||||||
    bottom-left: company,
 | 
					    bottom-left: emph(company),
 | 
				
			||||||
    bottom-right: emph(location),
 | 
					    bottom-right: emph(location),
 | 
				
			||||||
  )
 | 
					  )
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -17,8 +17,6 @@
 | 
				
			||||||
  accent-color: "#26428b",
 | 
					  accent-color: "#26428b",
 | 
				
			||||||
  font: "New Computer Modern",
 | 
					  font: "New Computer Modern",
 | 
				
			||||||
  paper: "a4",
 | 
					  paper: "a4",
 | 
				
			||||||
  author-position: left,
 | 
					 | 
				
			||||||
  personal-info-position: left,
 | 
					 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
== Work Experience
 | 
					== Work Experience
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue