this repo has no description
at main 2.9 kB view raw
1#let primary_colour = rgb("#244C74") 2#let secondary_colour = rgb("#244C74") 3#let link_colour = rgb("#3A5F8E") 4#let meta_grey = rgb("#555C65") 5 6#let icon(name, shift: 1.5pt) = { 7 box( 8 baseline: shift, 9 height: 10pt, 10 image("icons/" + name + ".svg") 11 ) 12 h(3pt) 13} 14 15#let findMe(services) = { 16 set text(8.5pt) 17 let icon = icon.with(shift: 2.5pt) 18 19 services.map(service => { 20 icon(service.name) 21 22 if service.link == "" { 23 if "display" in service.keys() { 24 service.display 25 } 26 } else if "display" in service.keys() { 27 link(service.link)[#{service.display}] 28 } else { 29 link(service.link) 30 } 31 }).join(h(10pt)) 32 [ 33 34 ] 35} 36 37#let term(period, location) = { 38 text(9.5pt, fill: meta_grey)[#icon("calendar") #period #h(1fr) #icon("location") #location] 39} 40 41 42 43#let max_rating = 5 44#let skill(name, rating) = { 45 let done = false 46 let i = 1 47 48 name 49 50 h(1fr) 51 52 while (not done){ 53 let colour = rgb("#c0c0c0") 54 let strokeColor = rgb("#c0c0c0") 55 let radiusValue = (left: 0em, right: 0em) 56 57 if (i <= rating){ 58 colour = primary_colour 59 strokeColor = primary_colour 60 } 61 62 // Add rounded corners for the first and last boxes 63 if (i == 1) { 64 radiusValue = (left: 2em, right: 0em) 65 } else if (i == max_rating) { 66 radiusValue = (left: 0em, right: 2em) 67 } 68 69 box(rect( 70 height: 0.3em, 71 width: 1.5em, 72 stroke: strokeColor, 73 fill: colour, 74 radius: radiusValue 75 )) 76 77 if (max_rating == i){ 78 done = true 79 } 80 81 i += 1 82 } 83 84 [\ ] 85} 86 87#let language(name, level) = { 88 name 89 h(1fr) 90 text(9pt, fill: meta_grey)[#{level}] 91 92 [\ ] 93} 94 95 96#let styled-link(dest, content) = emph(text( 97 fill: link_colour, 98 link(dest, content) 99 )) 100 101#let vantage( 102 name: "", 103 position: "", 104 links: (), 105 tagline: [], 106 experience, 107 gridBelow: [], 108) = { 109 set document( 110 title: name + "'s CV", 111 author: name, 112 ) 113 set text(9.5pt, font: "Public Sans", weight: "medium", fill: rgb("#111111")) 114 set par(leading: 0.65em) 115 set page( 116 margin: (x: 1.2cm, y: 1.2cm), 117 ) 118 119 show link: it => text(fill: link_colour, it) 120 121 show heading.where(level: 1) : it => text(18pt, weight: "extrabold",[#{it.body} #v(5pt, weak: true)]) 122 123 show heading.where( 124 level: 2, 125 ): it => text( 126 12pt, 127 weight: "bold", 128 fill: primary_colour, 129 [ 130 #{upper(it.body)} 131 #v(-7pt) 132 #line(length: 100%, stroke: 0.5pt + primary_colour) 133 ] 134 ) 135 136 show heading.where( 137 level: 3 138 ): it => text(11pt, weight: "semibold", fill: secondary_colour, it.body) 139 140 show heading.where( 141 level: 4 142 ): it => text( 143 10.5pt, 144 weight: "semibold", 145 fill: primary_colour, 146 it.body 147 ) 148 149 [= #name] 150 text(11.5pt, weight: "semibold",[#position]) 151 152 v(0pt) 153 findMe(links) 154 155 text(9pt)[#tagline] 156 157 158 experience 159 160 grid( 161 columns: (15%, 30%, 55%), 162 column-gutter: 1.5em, 163 ..gridBelow, 164 ) 165}