mirror of
https://github.com/Sped0n/bridget.git
synced 2026-04-14 10:09:31 -07:00
feat(link.html): update font preload links to use appropriate font files based on language code for improved font rendering
This commit is contained in:
@@ -25,14 +25,38 @@
|
||||
{{- end -}}
|
||||
|
||||
{{/* main js */}}
|
||||
<script type="module" src="bundled/js/main.js" defer></script>
|
||||
<script type="module" src="/bundled/js/main.js" defer></script>
|
||||
|
||||
{{/* fonts */}}
|
||||
<link
|
||||
<link rel="preload" href="/lib/fonts/NotoSans-Regular.woff2" as="font" crossorigin />
|
||||
{{- if (partial "function/langCode.html" (slice "en")) -}}
|
||||
<link rel="preload" href="/lib/fonts/GeistVF.woff2" as="font" crossorigin />
|
||||
{{- else if (partial "function/langCode.html" (slice "zh-cn" "zh-sg")) -}}
|
||||
<link
|
||||
rel="preload"
|
||||
href="/lib/fonts/GeistVF.woff2"
|
||||
href="/lib/fonts/NotoSansCJKsc-Regular.woff2"
|
||||
as="font"
|
||||
type="font/woff2"
|
||||
crossorigin
|
||||
/>
|
||||
<link rel="preload" href="/lib/fonts/fw.svg" as="font" type="font/svg" crossorigin />
|
||||
/>
|
||||
{{- else if (partial "function/langCode.html" (slice "zh-tw" "zh-hk" "zh-mo")) -}}
|
||||
<link
|
||||
rel="preload"
|
||||
href="/lib/fonts/NotoSansCJKtc-Regular.woff2"
|
||||
as="font"
|
||||
crossorigin
|
||||
/>
|
||||
{{- else if (partial "function/langCode.html" (slice "ja")) -}}
|
||||
<link
|
||||
rel="preload"
|
||||
href="/lib/fonts/NotoSansCJKjp-Regular.woff2"
|
||||
as="font"
|
||||
crossorigin
|
||||
/>
|
||||
{{- else if (partial "function/langCode.html" (slice "ko")) -}}
|
||||
<link
|
||||
rel="preload"
|
||||
href="/lib/fonts/NotoSansCJKkr-Regular.woff2"
|
||||
as="font"
|
||||
crossorigin
|
||||
/>
|
||||
{{- end -}}
|
||||
|
||||
Reference in New Issue
Block a user