Fix personal projects with icons having different spacing than ones without.
This commit is contained in:
parent
d27b64bd40
commit
94241d16a1
|
@ -2,6 +2,8 @@
|
||||||
#import "../utilities/localize.typ": localize
|
#import "../utilities/localize.typ": localize
|
||||||
|
|
||||||
#let personal_project(data, language) = {
|
#let personal_project(data, language) = {
|
||||||
|
let icon_size = 1.4em
|
||||||
|
|
||||||
let personal_project_name = localize(data, "name", language)
|
let personal_project_name = localize(data, "name", language)
|
||||||
|
|
||||||
let personal_project_heading = heading(level: 3, link(data.link, personal_project_name));
|
let personal_project_heading = heading(level: 3, link(data.link, personal_project_name));
|
||||||
|
@ -11,7 +13,7 @@
|
||||||
clip_icon: true,
|
clip_icon: true,
|
||||||
icon: "../" + data.header_image,
|
icon: "../" + data.header_image,
|
||||||
icon_alt_text: personal_project_name,
|
icon_alt_text: personal_project_name,
|
||||||
icon_size: 1.4em,
|
icon_size: icon_size,
|
||||||
personal_project_heading,
|
personal_project_heading,
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
|
@ -21,12 +23,17 @@
|
||||||
// Use a grid to space out the header and the body.
|
// Use a grid to space out the header and the body.
|
||||||
grid(
|
grid(
|
||||||
gutter: 0.5em,
|
gutter: 0.5em,
|
||||||
|
// Set the height explicitly so the ones with icons don't look different
|
||||||
|
// from the ones without.
|
||||||
|
box(
|
||||||
|
height: icon_size,
|
||||||
// Use another grid to position the title and date.
|
// Use another grid to position the title and date.
|
||||||
grid(
|
grid(
|
||||||
columns: (1fr, auto),
|
columns: (1fr, auto),
|
||||||
personal_project_header,
|
personal_project_header,
|
||||||
align(horizon, text(size: 0.9em, localize(data, "date", language))),
|
align(horizon, text(size: 0.9em, localize(data, "date", language))),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
// The body can contain Typst code so we use `eval()` to render it.
|
// The body can contain Typst code so we use `eval()` to render it.
|
||||||
eval(localize(data, "body", language)),
|
eval(localize(data, "body", language)),
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue