Skip to content

Commit 7ef8268

Browse files
zzamboniyunanwg
andauthored
feat: make cv-section headings sticky (#152)
Put the heading in a block with sticky:true, to prevent orphan headings at the bottom of the page. Co-authored-by: Yunan Wang <77310871+yunanwg@users.noreply.github.com>
1 parent 46fe30b commit 7ef8268

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

src/cv.typ

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -302,18 +302,21 @@
302302
}
303303

304304
v(before-section-skip)
305-
if non-latin {
306-
section-title-style(title, color: accent-color)
307-
} else {
308-
if highlighted {
309-
section-title-style(highlighted-text, color: accent-color)
310-
section-title-style(normal-text, color: black)
305+
block(
306+
sticky: true,
307+
[#if non-latin {
308+
section-title-style(title, color: accent-color)
311309
} else {
312-
section-title-style(title, color: black)
310+
if highlighted {
311+
section-title-style(highlighted-text, color: accent-color)
312+
section-title-style(normal-text, color: black)
313+
} else {
314+
section-title-style(title, color: black)
315+
}
313316
}
314-
}
315-
h(2pt)
316-
box(width: 1fr, line(stroke: 0.9pt, length: 100%))
317+
#h(2pt)
318+
#box(width: 1fr, line(stroke: 0.9pt, length: 100%))]
319+
)
317320
}
318321

319322
/// Prepare common entry parameters

0 commit comments

Comments
 (0)