char/cv

git clone https://git.t4t.associates/char/cv

Charlotte Sommore polishfbadae1

main
3.3 KiB163 linesraw
1#let icon(name, shift: 0.25em) = {
2  box(
3    baseline: shift,
4    height: 1.25em,
5    image("icons/" + name + ".svg", alt: name)
6  )
7  h(0.35em)
8}
9
10#let cv(
11  name: "",
12  tagline: "",
13  links: (),
14  paper: "a4",
15  accent: rgb("#870c66"),
16  heading_font: "Inter",
17  body_font: "Inter",
18  mono_font: "TX-02",
19  doc,
20) = {
21  set text(size: 9pt, font: body_font, weight: "medium")
22  set page(paper, margin: (x: 0.8cm, y: 0.8cm))
23  set par(justify: true)
24
25  show raw: it => text(size: 1.2em, font: mono_font, baseline: -0.05em)[#it]
26
27  show heading.where(level: 1): it => text(
28    size: 1.6em,
29    font: heading_font,
30    tracking: 0.1pt,
31    weight: "semibold",
32    block[
33      #{it.body}
34    ]
35  )
36
37  show heading.where(level: 2): it => text(
38    fill: accent,
39    font: heading_font,
40    tracking: 0.1pt,
41    weight: "bold",
42    size: 1.35em,
43    [
44      #{it.body}
45      #v(-0.85em)
46      #line(length: 100%, stroke: 1pt + accent)
47      #v(0.2em)
48    ]
49  )
50
51  show heading.where(level: 3): it => text(
52    size: 1.2em,
53    weight: "semibold",
54    block[#it]
55  )
56
57  [
58    #grid(
59      columns: (1fr, 1fr),
60      gutter: 1em,
61      {
62        [= #name]
63      
64        text(
65          font: body_font,
66          size: 1em,
67          block[#{tagline}]
68        )
69      },
70      [
71        #box[
72          #h(4em)
73          #grid(
74            columns: 2,
75            gutter: 0.75em,
76            ..links.map(l => {
77              [#h(2em)]
78              link(l.link)[
79                #set text(weight: "medium")
80                #icon(l.icon)
81                #if "text" in l.keys() { l.text } else { l.link }
82              ]
83            })
84          )
85        ]
86      ]
87    )
88  ]
89
90  doc
91}
92
93#let divider(accent: rgb("#870c66")) = {
94  v(-0.25em)
95  line(length: 100%, stroke: (paint: accent, thickness: 1pt, dash: "dotted"))
96  v(-0.25em)
97}
98
99#let event(
100  accent: rgb("#870c66"), company_newline: false,
101  title, company, period, location
102) = [
103  #if company_newline {
104      grid(
105        columns: (auto, 1fr),
106        align: (left + bottom, right + bottom),
107        box[
108          #text(1.2em, weight: "semibold")[#title]\
109          #text(0.96em, fill: accent, weight: "bold")[_#[#company]_]
110        ],
111        box[
112          #if period != [] {
113            icon("calendar", shift: 0.18em)
114            [_#[#period]_]
115          }\
116          #if location != [] {
117            icon("location")
118            location
119          }
120        ]
121      )    
122  } else {
123    grid(
124      columns: (1fr, auto),
125      align: (left + top, right + top),
126      box(text(1.2em, weight: "semibold")[#title]),
127      box(text(0.96em, fill: accent, weight: "bold")[_#[#company]_])
128    )
129    
130    v(-0.5em)
131    if period != [] {
132      icon("calendar", shift: 0.18em)
133      [_#[#period]_]
134    }
135    h(1fr)
136    if location != [] {
137      icon("location")
138      location
139    }
140  }
141]
142
143#let article(
144  accent: rgb("#870c66"),
145  title: "", date: "", url: ""
146) = [
147  #par(justify: false)[
148    #text(weight: "semibold")[
149      #text(size: 1.2em)["#title"]
150    ]\
151    #text(size: 0.85em, style: "italic", weight: "semibold", tracking: -0.025em)[
152      #icon("calendar", shift: 0.15em)
153      #h(0.1em)
154      #date
155    ]
156    #h(0.75em)
157    #text(size: 0.85em, style: "italic", weight: "bold", tracking: -0.025em, fill: accent)[
158      #icon("link", shift: 0.25em)
159      #h(-0.25em)
160      #link("https://" + url)[#url]
161    ]
162  ]
163]