hackertours/layouts/_partials
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Vincent Mahnke e237cf2a06
All checks were successful
/ build (pull_request) Successful in 1m17s
/ accessibility (pull_request) Successful in 2m0s
fix: Avoids layout jitter while fonts load
The headings jumped when Jersey 10 arrived after the first paint: the monospace fallback is much wider, so the heading chips changed their width, and the page transition made it visible on every language switch. Reproduced with revalidated or slow fonts (hugo server sends no cache headers, so it revalidates them on every navigation) in Chromium, WebKit and, on cold loads, Firefox. In Safari the body text shifted as well, because its ui-monospace is the wider SF Mono.

- Embeds the Latin subset of Jersey 10 in the fonts stylesheet.
- Preloads Hack Regular and Bold.
- Generates the @font-face rules and the preload links from one fingerprinted template (assets/css/fonts.css.tmpl, head/fonts.html), so their URLs match and also work below a sub path like the PR previews.
- Drops ui-monospace and SF Mono from the body font stack: Menlo has the same width as Hack.

Frames with shifted elements while switching language on the tours page, with revalidated or slow fonts: 9 to 92 before, none after (Chromium and WebKit, desktop and mobile). Firefox cold loads: up to 48 before, none painted after. Rendering after loading is unchanged.

Trade-off: the first paint of a cold load on a slow connection (Slow 4G) is about 0.26 s later; later navigations are not affected.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-08 13:11:35 +01:00
..
head fix: Avoids layout jitter while fonts load 2026-11-08 13:11:35 +01:00
footer.html feat: Applies 40c3 style to website 2026-11-08 11:26:46 +01:00
gallery-script.html Add an image gallery shortcode 2026-10-17 10:16:37 +02:00
icon.html Keeps logo size across languages and resolves mobile menu overlap (#68) 2026-11-07 21:28:53 +01:00
lang-badge.html Add accessilbilty check and fixes 2026-10-17 10:03:54 +02:00
language-selector-inline.html Keeps logo size across languages and resolves mobile menu overlap (#68) 2026-11-07 21:28:53 +01:00
language-selector.html Keeps logo size across languages and resolves mobile menu overlap (#68) 2026-11-07 21:28:53 +01:00
lint-brand.html Keeps logo size across languages and resolves mobile menu overlap (#68) 2026-11-07 21:28:53 +01:00
logo-40c3.html feat: Applies 40c3 style to website 2026-11-08 11:26:46 +01:00
menu.html fix: Restores header layout and uses 40C3 page colours for light theme 2026-11-08 11:49:58 +01:00
mobilemenu.html Keeps logo size across languages and resolves mobile menu overlap (#68) 2026-11-07 21:28:53 +01:00
schedule-script.html Attempt a shortcode for the schedule overview 2026-10-16 18:53:55 +02:00