typst/mir_cards/card.typ

59 lines
1.2 KiB
Typst
Raw Permalink Normal View History

2025-08-13 19:57:24 -04:00
#let companytext(size, body, style: "normal") = text(
2025-08-13 22:29:45 -04:00
size: 12pt,
2025-08-13 19:57:24 -04:00
weight: "medium",
)[#body]
#let blurbtext(size, body, style: "normal") = text(
2025-08-13 22:29:45 -04:00
size: 8pt,
2025-08-13 19:57:24 -04:00
style: style,
weight: "light",
)[#body]
#let minimalbc(
company_name: "Company Name",
blurb: "Innovative solutions for modern businesses",
2025-08-13 22:29:45 -04:00
social_user: "user.101",
2025-08-13 19:57:24 -04:00
email_address: "me@me.com",
website: "example.com",
bg_image: none,
geo_size: "eu",
body,
) = {
set text(font: "Pixelify Sans")
2025-08-13 22:29:45 -04:00
set text(8pt)
2025-08-13 19:57:24 -04:00
let pz = geo_size + "-business-card"
set page(paper: pz, fill: white)
if bg_image != none {
place(bg_image)
}
grid(
columns: 100%,
rows: (50%, 10%, 35%),
gutter: 0.5mm,
grid(
columns: 100%,
rows: (40%, 20%, 40%),
gutter: 0mm,
companytext(14pt, company_name),
[],
grid.cell(colspan: 1, blurbtext(10pt, blurb)),
),
[],
grid(
columns: (12%, 88%),
rows: (33%, 33%, 34%),
align: bottom + left,
gutter: 0.5mm,
2025-08-13 22:29:45 -04:00
grid.cell("fedi:", align: right),
grid.cell(social_user, align: left),
2025-08-13 19:57:24 -04:00
grid.cell("email:", align: right),
grid.cell(email_address, align: left),
grid.cell("web:", align: right),
grid.cell(website, align: left),
)
)
}