Skip to content

Commit

Permalink
Change: Make fallback font static
Browse files Browse the repository at this point in the history
  • Loading branch information
alphapapa committed Sep 27, 2023
1 parent 1861df4 commit 3305bd4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion assets/theme-css/vars.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* prettier-ignore */
:root {
--fontFamily: "{{ .Site.Params.font.name }}", "{{ .Site.Params.font.fallbackName }}";
--fontFamily: {{ .Site.Params.font.name }};

--colorPrimaryDark: rgb(1, 50, 67);
--colorPrimary: rgb(77, 119, 207);
Expand Down
1 change: 0 additions & 1 deletion config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ params:
navColor: blue
font:
name: "Lato"
fallbackName: "Noto Sans Symbols 2"
sizes: [400, 900]
plausible:
dataDomain: null
Expand Down
6 changes: 1 addition & 5 deletions layouts/partials/css.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@
<link rel="stylesheet" href="{{ $fontUrl }}">

<!-- Fallback font for symbols (such as "🛈"). -->
{{- $fallbackFontName := .Site.Params.font.fallbackName | default "Noto Sans Symbols 2" -}}
{{- $fallbackFontFace := replace $fallbackFontName " " "+" -}}
{{- $fallbackFontSizes := delimit (.Site.Params.font.sizes | default (slice 300 400 600 700)) "," -}}
{{- $fallbackFontUrl := printf "https://fonts.googleapis.com/css?family=%s:%s" $fallbackFontFace $fallbackFontSizes -}}
<link rel="stylesheet" href="{{ $fallbackFontUrl }}">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Sans+Symbols+2">

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css">

Expand Down

0 comments on commit 3305bd4

Please sign in to comment.