diff options
| author | Eltrac <hi@guhub.cn> | 2025-07-14 19:26:28 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-07-14 19:26:28 +0800 |
| commit | 29af8b6c2bd89c1966512b4305af345b8ee1ef82 (patch) | |
| tree | 07a4801791db7d6a4670d53411f0689ec0090bfe /layouts/_partials/head/css.html | |
| parent | 44c7def3f6958550ccf965971f1819c1d6c514f1 (diff) | |
refactor: clearer division of each partial and better folder structure
Diffstat (limited to 'layouts/_partials/head/css.html')
| -rw-r--r-- | layouts/_partials/head/css.html | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/layouts/_partials/head/css.html b/layouts/_partials/head/css.html new file mode 100644 index 00000000..b55dbe8d --- /dev/null +++ b/layouts/_partials/head/css.html @@ -0,0 +1,34 @@ +<!-- Google Fonts --> +<link rel="preconnect" href="https://fonts.googleapis.com"> +<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> +{{ if eq .Site.Language.Lang "zh" }} +<link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@200..900&family=Noto+Serif:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet"> +{{ else }} +<link href="https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap" rel="stylesheet"> +{{ end }} + +<!-- Aplayer --> +{{ if .Params.aplayer }} +{{ with resources.Get "css/aplayer.css" }} +<style>{{ .Content | safeCSS }}</style> +{{ end }} +{{ end }} + +<!-- Extra --> +{{ range .Site.Params.extraCSSFiles -}} +<link + rel="stylesheet" + href="{{ $.Site.Params.staticPrefix }}{{ . | relURL }}" +/> +{{- end }} + +<!-- theme css --> +{{ with resources.Get "css/global.scss" | css.Sass | minify }} +<style>{{ .Content | safeCSS }}</style> +{{ end }} + +{{- if or (in .Section "posts") (in .Section "cards") (in .Section "fictions") (in .Section "library") (eq .Type "single") }} +{{ with resources.Get "css/content.scss" | css.Sass | minify }} +<style>{{ .Content | safeCSS }}</style> +{{ end }} +{{- end }} |
