feat: logo support

This commit is contained in:
eggy
2025-10-18 00:26:51 +08:00
parent 5cbaf3ff11
commit 89cb3f276f
9 changed files with 40 additions and 7 deletions

View File

@@ -24,6 +24,9 @@
#let JOB_TITLE_FONT_SIZE = 1.05em
#let LOGO_IMAGE_HEIGHT = 2.25em
#let LOGO_IMAGE_GAP = 0.75em
// rest = not top
#let PAGE_MARGINS = (right: 0.425in, top: 0.3in, left: 0.375in, bottom: 0.4in)
@@ -70,24 +73,49 @@
end_date: none,
location: none,
company_link: none,
logo: none,
) = {
cv_entry(left_content: {
let logo_img = if logo != none {
// image("../logos/" + logo, height: LOGO_IMAGE_HEIGHT)
none
} else {
none
}
let company_text = if company_link == none {
[#company]
} else {
[#link(company_link)[#company]]
}
text(JOB_TITLE_FONT_SIZE)[*#company_text*]
// company title + role
let left_text = stack(
align(horizon, {
text(JOB_TITLE_FONT_SIZE)[*#company_text*]
"\n"
set strong(delta: SMALL_STRONG)
[_#role _]
})
)
// render with logo if exists
if logo_img != none {
stack(
dir: ltr,
spacing: LOGO_IMAGE_GAP,
logo_img,
left_text,
)
} else {
left_text
}
if tools != none {
// text[ | _ #tools _ ]
}
"\n"
set strong(delta: SMALL_STRONG)
[_#role _]
}, right_content: {
text(style: "italic")[#start_date -- #end_date]