/main.typ Secret
Last active
December 29, 2024 20:19
Typst grid and timeline problem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#set page(margin: (x: 1.25cm, y: 1.5cm)) | |
#let dot() = { | |
let size = 6pt | |
box( | |
width: size, | |
height: size, | |
radius: size / 2, | |
fill: black, | |
) | |
} | |
#let company_logo(size: 40pt) = { | |
box( | |
width: size, | |
height: size, | |
stroke: 1pt + black, | |
) | |
} | |
#let experience(title: [], company: none, period: "", location: "", desc) = [ | |
=== #title \ | |
#if company != none [#company \ ] | |
#text(size: 9pt)[ | |
#period | |
#h(1fr) | |
#location | |
] | |
#desc | |
] | |
#let chronology( | |
company, | |
..experiences | |
) = { | |
box[ | |
#company_logo() | |
#company | |
] | |
grid( | |
columns: (auto, auto), | |
column-gutter: 1em, | |
row-gutter: 12pt, | |
..experiences.pos().map(exp => { | |
let is_last = exp == experiences.pos().at(experiences.pos().len() - 1) | |
( | |
box[ | |
#dot() | |
#if not is_last { | |
context place( | |
dx: 2.5pt, | |
dy: 6pt, | |
layout(size => { | |
let m = measure(exp) | |
line( | |
angle: 90deg, | |
stroke: 1.5pt + black, | |
length: m.height | |
) | |
}) | |
) | |
} | |
], | |
exp | |
) | |
}).join() | |
) | |
} | |
#grid( | |
columns: (60%, auto), | |
inset: 5pt, | |
gutter: 20pt, | |
)[ | |
== Experience | |
#chronology( | |
"Company X", | |
)[ | |
#experience( | |
title: "Sales Associate", | |
period: "Dec 2022 -- Jun 2024", | |
location: "Mars", | |
)[ | |
- Collaborated with the store merchandiser creating displays to attract clientele | |
- Use my trend awareness to assist customers in their shopping experience | |
- Thoroughly scan every piece of merchandise for inventory control | |
- Process shipment to increase my product knowledge | |
] | |
][ | |
#experience( | |
title: "Spa Consultant", | |
period: "Apr 2021 -- Dec 2022", | |
location: "Planet Earth", | |
)[ | |
- Sell retail and memberships to meet company sales goals | |
- Build organizational skills by single handedly running all operating procedures | |
] | |
][ | |
#experience( | |
title: "Sales Associate", | |
period: "Apr 2021 -- Dec 2022", | |
location: "Planet Earth", | |
)[ | |
- Stocked sales floor with fast fashion inventory | |
- Marked down items allowing me to see unsuccessful merchandise in a retail market | |
- Offered advice and assistance to each guest | |
] | |
] | |
][ | |
== Other things | |
#lorem(50) | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment