-
Notifications
You must be signed in to change notification settings - Fork 0
/
class.typ
93 lines (85 loc) · 2.84 KB
/
class.typ
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#let font_default_size = 11pt
// Set name and contact data and format headings
#let template(name, contact_data, color, doc) = {
set page(margin: (x: 1.5cm, y: 0.8cm))
set par(justify: true, leading: 0.4em)
set text(size: font_default_size, font: "New Computer Modern")
show heading: set block(above: 1.5em, below: 0.5em)
show link: set text(fill: rgb(0, 0, 255))
show par: set block(spacing: 0.5em)
show raw: set text(font: "New Computer Modern")
align(center)[
#smallcaps(text(size: 2.5em, fill: color)[#name]) \
#{
if contact_data != none and contact_data.len() > 0 {
let elements = for el in contact_data {
(link(el.link)[#{box(image(height: 0.7em, "./logo/" + el.service + ".svg")) + " " + el.display}],)
}
elements.join(" | ")
}
}
]
show heading.where(level: 1): i => {
set align(left)
let title = smallcaps(i.body)
set block(above: 0.2em)
set text(weight: "light", size: 1.2em, fill: color)
stack(
dir: ttb,
spacing: 3mm,
title,
line(length: 100%, stroke: color)
)
}
show heading.where(level: 2): i => {
set align(left)
let title = smallcaps(i.body)
set block(above: 0.8em)
set text(weight: "light", size: 1.1em, fill: color)
title
}
doc
}
#let experience_entry(logo_path: str, logo_size: none, company: str, role: str, start_date: str, end_date: none, description: str, skills: none) = {
if logo_size == none {
logo_size = 1.3cm
}
grid(
columns: (3.5cm, 1fr),
gutter: 0cm,
inset: (x: 3pt, y: 1pt),
grid.cell(
breakable: false,
inset: (y: 5pt),
figure(
image(logo_path, width: logo_size),
caption: [#text(size: font_default_size - 2pt, company)],
numbering: none,
placement: top,
kind: image,
)
),
grid.cell(
align: left,
[
*#role* \
_#text(size: font_default_size - 1pt, start_date)―#text(size: font_default_size - 1pt, end_date)_ \
#description \
#{
if skills != none {
let cell = rect.with(radius: 3pt, inset: 3pt)
let boxes = for skill in skills {(box(cell(text(size: 8pt, skill))),)}
{boxes.join(" ")}
}
}
]
),
)
}
// Entry for skills
#let skill_entry(category, skills) = {
[=== #category]
let cell = rect.with(radius: 3pt, inset: 3pt)
let boxes = for skill in skills {(box(cell(text(size: 9pt, skill))),)}
{boxes.join(" ")}
}