|
2 | 2 | {{- $page := . -}} |
3 | 3 |
|
4 | 4 | {{- $inServerMode := .Site.IsServer -}} |
5 | | -{{- $serverOpts := cond ($inServerMode) (dict "enableSourceMap" true) (dict "outputStyle" "compressed") -}} |
| 5 | +{{- $serverOpts := cond ($inServerMode) (dict "enableSourceMap" true) (dict "outputStyle" "compressed") -}} |
6 | 6 | {{- $sassCompiler := dict "transpiler" "dartsass" -}} |
7 | | -{{- $cssOpts := collections.Merge $sassCompiler $serverOpts -}} |
8 | | -{{- $sass := (slice "theme-css/pst/pydata-sphinx-theme.scss") -}} |
| 7 | +{{- $cssOpts := collections.Merge $sassCompiler $serverOpts -}} |
| 8 | +{{- $sass := (slice "theme-css/pst/pydata-sphinx-theme.scss") -}} |
9 | 9 |
|
10 | 10 | <!-- Fonts --> |
11 | | -{{- $fontName := .Site.Params.font.name | default "Open Sans" -}} |
12 | | -{{- $fontFace := replace $fontName " " "+" -}} |
13 | | -{{- $fontSizes := delimit (.Site.Params.font.sizes | default (slice 300 400 600 700)) "," -}} |
14 | | -{{- $fontUrl := printf "https://fonts.googleapis.com/css?family=%s:%s" $fontFace $fontSizes -}} |
| 11 | +{{- $fontName := .Site.Params.font.name | default "Open Sans" -}} |
| 12 | +{{- $fontFace := replace $fontName " " "+" -}} |
| 13 | +{{- $fontSizes := delimit (.Site.Params.font.sizes | default (slice 300 400 600 700)) ";" -}} |
| 14 | +{{- $fontUrl := printf "https://fonts.googleapis.com/css2?family=%s:wght@%s" $fontFace $fontSizes -}} |
15 | 15 |
|
16 | 16 | <link rel="icon" href="{{ "images/favicon.ico" | relURL }}" /> |
| 17 | + |
| 18 | +<link rel="preconnect" href="https://fonts.googleapis.com"> |
| 19 | +<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> |
17 | 20 | <link rel="stylesheet" href="{{ $fontUrl }}"> |
18 | 21 |
|
19 | | -<!-- Fallback font for symbols (such as "🛈"). --> |
20 | | -<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Sans+Symbols+2"> |
| 22 | +<!-- Fallback font for symbols (such as "🛈"). -- |
| 23 | +<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Noto+Sans+Symbols+2"> |
21 | 24 |
|
22 | 25 | <!-- SASS --> |
23 | 26 | {{- range $sass -}} |
|
0 commit comments