The design from PR #67, after the 40C3 style guide, as a theme listed before hackertours in hugo.yaml, so it can be switched off again with one line after the event: - _custom.css, _events.css, the fonts, the 40C3 logo and the web manifest are taken over unchanged from the PR. - The PR's four changes to _schedule.css are an override in _schedule-40c3.css, so the generic schedule CSS stays shared. - The additions to head/extra.html and footer.html go through two new hooks in themes/hackertours, event-design/head.html and event-design/footer.html, which are empty in the generic design. - The content changes (40C3 heading on the home page, FAQ titles, Electrum headings) are taken over as they are. Not taken over: the stray hackertours_banner.webp.md and the removal of the tour-map script from home-baseof.html.
25 lines
1.6 KiB
HTML
25 lines
1.6 KiB
HTML
{{- /*
|
|
Self-hosted fonts: Jersey 10 for headings and Hack for everything else (assets/fonts, licences in
|
|
static/fonts). Their @font-face rules are generated from assets/css/fonts.css.tmpl instead of
|
|
being part of the main stylesheet. A web font that arrives after the first paint swaps in and
|
|
moves the page: Jersey 10 is far narrower than the monospace fallback, so the heading chips
|
|
changed their width, and the page transition made that visible on every language switch.
|
|
|
|
- The Latin subset of Jersey 10 is embedded in the stylesheet, so it is there at the first paint
|
|
whatever the connection, and without a request that the browser would have to revalidate.
|
|
- Hack is preloaded, so the body text is not first drawn in a fallback font of a different
|
|
character width (SF Mono in Safari, Consolas on Windows). Its URL here and in @font-face come
|
|
from the same fingerprinted resource, so they are identical (and correct below a sub path, as
|
|
on the PR previews).
|
|
*/ -}}
|
|
{{- with resources.Get "css/fonts.css.tmpl" | resources.ExecuteAsTemplate "css/fonts.tmpl.css" . }}
|
|
{{- /* The executed template has no media type (from ".tmpl"), which minify needs. */ -}}
|
|
{{- with resources.FromString "css/fonts.css" .Content | minify | fingerprint }}
|
|
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- range slice "Hack-Regular" "Hack-Bold" }}
|
|
{{- with resources.Get (printf "fonts/%s.woff2" .) | fingerprint }}
|
|
<link rel="preload" href="{{ .RelPermalink }}" as="font" type="font/woff2" crossorigin>
|
|
{{- end }}
|
|
{{- end }}
|