Load Inter CSS directly (#1444)

Move the load of the Inter font CSS from _variables_project.scss to head-end.html.

Empirically, this seems to fix #965
This commit is contained in:
Richard van der Hoff 2023-02-28 14:56:19 +00:00 committed by GitHub
parent 427f472331
commit a9e9202e89
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 6 deletions

View file

@ -6,6 +6,16 @@
*/}}
{{/*
Load the Inter font.
We load it from a local copy, which is downloaded from
Google Fonts manually via a script:
https://github.com/matrix-org/matrix-spec/tree/main/static/css/fonts
*/}}
<link rel="preload" href="{{ "/css/fonts/Inter.css" | relURL }}" as="style">
<link rel="stylesheet" href="{{ "/css/fonts/Inter.css" | relURL }}">
{{ $scss := "scss/custom.scss"}}
{{ if .Site.IsServer }}
{{/* Note the missing postCSS. This makes it snappier to develop in Chrome, but makes it look sub-optimal in other browsers. */}}