#let primary_colour = rgb("#244C74") #let secondary_colour = rgb("#244C74") #let link_colour = rgb("#3A5F8E") #let meta_grey = rgb("#555C65") #let icon(name, shift: 1.5pt) = { box( baseline: shift, height: 10pt, image("icons/" + name + ".svg") ) h(3pt) } #let findMe(services) = { set text(8.5pt) let icon = icon.with(shift: 2.5pt) services.map(service => { icon(service.name) if service.link == "" { if "display" in service.keys() { service.display } } else if "display" in service.keys() { link(service.link)[#{service.display}] } else { link(service.link) } }).join(h(10pt)) [ ] } #let term(period, location) = { text(9.5pt, fill: meta_grey)[#icon("calendar") #period #h(1fr) #icon("location") #location] } #let max_rating = 5 #let skill(name, rating) = { let done = false let i = 1 name h(1fr) while (not done){ let colour = rgb("#c0c0c0") let strokeColor = rgb("#c0c0c0") let radiusValue = (left: 0em, right: 0em) if (i <= rating){ colour = primary_colour strokeColor = primary_colour } // Add rounded corners for the first and last boxes if (i == 1) { radiusValue = (left: 2em, right: 0em) } else if (i == max_rating) { radiusValue = (left: 0em, right: 2em) } box(rect( height: 0.3em, width: 1.5em, stroke: strokeColor, fill: colour, radius: radiusValue )) if (max_rating == i){ done = true } i += 1 } [\ ] } #let language(name, level) = { name h(1fr) text(9pt, fill: meta_grey)[#{level}] [\ ] } #let styled-link(dest, content) = emph(text( fill: link_colour, link(dest, content) )) #let vantage( name: "", position: "", links: (), tagline: [], experience, gridBelow: [], ) = { set document( title: name + "'s CV", author: name, ) set text(9.5pt, font: "Public Sans", weight: "medium", fill: rgb("#111111")) set par(leading: 0.65em) set page( margin: (x: 1.2cm, y: 1.2cm), ) show link: it => text(fill: link_colour, it) show heading.where(level: 1) : it => text(18pt, weight: "extrabold",[#{it.body} #v(5pt, weak: true)]) show heading.where( level: 2, ): it => text( 12pt, weight: "bold", fill: primary_colour, [ #{upper(it.body)} #v(-7pt) #line(length: 100%, stroke: 0.5pt + primary_colour) ] ) show heading.where( level: 3 ): it => text(11pt, weight: "semibold", fill: secondary_colour, it.body) show heading.where( level: 4 ): it => text( 10.5pt, weight: "semibold", fill: primary_colour, it.body ) [= #name] text(11.5pt, weight: "semibold",[#position]) v(0pt) findMe(links) text(9pt)[#tagline] experience grid( columns: (15%, 30%, 55%), column-gutter: 1.5em, ..gridBelow, ) }