Skip to content

Commit

Permalink
Add initial function for showcasing project entries
Browse files Browse the repository at this point in the history
  • Loading branch information
gteufelberger committed Oct 26, 2024
1 parent 03b0d65 commit a562968
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/main.typ
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,32 @@
dates: [2016 - 2020],
[]
)

= Projects

#project(
name: [typst-almeida-cv],
short_description: [#lorem(8)],
dates: [Summer 2024 - now],
location: [],
url: [https://github.com/gteufelberger/typst-almeida-cv/],
tags: [
- Typst
- CV
],
[#lorem(20)],
)

#project(
name: [#lorem(2)],
short_description: [#lorem(8)],
dates: [2020 - 2022],
location: [],
url: [https://example.com],
tags: [
- #lorem(2)
- #lorem(1)
- #lorem(3)
],
[#lorem(20)],
)
51 changes: 51 additions & 0 deletions src/template.typ
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,54 @@
}
)
}

// Project
#let project(
name: [],
short_description: [],
dates: [],
location: [],
url: [],
tags: [],
content,
) = {
grid(columns: (3fr, 1fr), column-gutter: 5pt,
[==== #name],
align(end, {
text(fill: accentColor, fi.map-icon.marker-alt)
h(4pt)
text(fill: gray, location)
})
)
text()[
===== #short_description
]

text()[
#dates

#location
]

if url.has("dest") {
if url.dest.contains("https://github.com/") {
fa(fi.github) + h(4pt)
}
if url.dest.contains("https://gitlab") {
fa(fi.gitlab) + h(4pt)
}

link(url.dest)
}

v(5pt)

content

show list: items => {
align(end, items.children.map(
c => h(2pt) + pill(c.body) + h(2pt)
).join())
}
tags
}

0 comments on commit a562968

Please sign in to comment.