aboutsummaryrefslogtreecommitdiff
path: root/template.typ
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--template.typ97
1 files changed, 57 insertions, 40 deletions
diff --git a/template.typ b/template.typ
index 8bc210d..8f2beee 100644
--- a/template.typ
+++ b/template.typ
@@ -2,18 +2,23 @@
#let icon_font = "Font Awesome 7 Free Solid"
#let icon_size = 10pt
+/* Building blocks */
+/********************************************************************/
+/* Font awesome icon */
#let fa(txt, size: 7pt) = text(
font: icon_font,
size: size,
txt,
)
+/* Underlined link or content if no url provided */
#let smartlink(url, content) = if url != none {
link(url, underline(offset: 1.5pt, content))
} else {
content
}
+/* Inverted box */
#let inv_box(content, size: 10pt, bold: true, capital: true) = box(
fill: black,
inset: 3pt,
@@ -25,13 +30,24 @@
),
)
-#let job(title, location) = stack(
+/* Date subtext in experience */
+#let date_tag(tag) = if tag != "" {
+ v(-0.2em)
+ text(size: 8pt)[#raw(tag)]
+}
+
+
+/* Document parts */
+/********************************************************************/
+/* Active jobs under author name */
+#let active_job(title, location) = stack(
dir: ttb,
spacing: 0.5em,
strong(title),
location,
)
+/* Icons in top right */
#let iconlink(icon, label) = grid(
columns: (auto, auto),
column-gutter: 0.5em,
@@ -52,17 +68,56 @@
text(size: 9pt, label)
)
+/* Labeled percent bar */
#let skillbar(title, percent) = (
// Use array so alignment can be determined in parrent
inv_box(title, size: 9pt, bold: false, capital: false),
line(length: percent, stroke: 10pt),
)
+/* Labeled percent circles */
#let skillbubble(title, percent) = (
circle(fill: black, radius: percent * 2.5em),
text(title),
)
+/* Experience entry */
+#let experience(date, title, location, description, skills: (), tag: "") = block(
+ breakable: false,
+ grid(
+ columns: (8em, auto),
+ rows: (auto, auto),
+ row-gutter: 0.7em,
+ column-gutter: 1em,
+ date,
+ stack(
+ dir: ltr,
+ spacing: 1fr,
+ strong(title),
+ text(size: 8pt, weight: "bold", location),
+ ),
+ date_tag(tag), //
+ par(justify: true, description),
+ none,
+ skills
+ .map(raw)
+ .join({
+ h(1em)
+ raw("/")
+ h(1em)
+ }),
+ ),
+)
+
+/* Extra titled paragraphs */
+#let info(title, content) = {
+ inv_box(title, size: 8pt)
+ set par(justify: true)
+ set text(size: 8pt)
+ content
+}
+
+/* Work field containing experiences, education, etc. */
#let field(name, bubbles: (), experiences: (), education: (), other: ()) = {
/* Title */
heading(name)
@@ -100,45 +155,7 @@
)
}
-#let date_tag(tag) = if tag != "" {
- v(-0.2em)
- text(size: 8pt, tag)
-}
-
-#let experience(date, title, location, description, skills: (), tag: "") = block(
- breakable: false,
- grid(
- columns: (8em, auto),
- rows: (auto, auto),
- row-gutter: 0.7em,
- column-gutter: 1em,
- date,
- stack(
- dir: ltr,
- spacing: 1fr,
- strong(title),
- text(size: 8pt, weight: "bold", location),
- ),
- date_tag(tag), //
- par(justify: true, description),
- none,
- skills
- .map(raw)
- .join({
- h(1em)
- raw("/")
- h(1em)
- }),
- ),
-)
-
-#let info(title, content) = {
- inv_box(title, size: 8pt)
- set par(justify: true)
- set text(size: 8pt)
- content
-}
-
+/* Main document template */
#let CV(
author: "Janez Novak",
active_jobs: (),