summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEltrac <eltrac233@gmail.com>2024-11-28 23:18:12 +0800
committerEltrac <eltrac233@gmail.com>2024-11-28 23:18:12 +0800
commit9a5213bc7fbecbcc19af73dd9d437458949827be (patch)
tree434de402e3b7d7103cb8775974d52d384b8a43a1
parent7175b0c79003af98ace77129761048f153b26f7d (diff)
refactor: move all css to css partial
-rw-r--r--themes/yinyang/layouts/partials/head.html7
-rw-r--r--themes/yinyang/layouts/partials/head/css.html8
2 files changed, 9 insertions, 6 deletions
diff --git a/themes/yinyang/layouts/partials/head.html b/themes/yinyang/layouts/partials/head.html
index f51ed656..c1d28881 100644
--- a/themes/yinyang/layouts/partials/head.html
+++ b/themes/yinyang/layouts/partials/head.html
@@ -13,12 +13,7 @@
{{ partial "head/siteinfo" . }}
<!-- Stylesheets -->
- {{ with resources.Get "css/index.css" | minify }}
- <style>{{ .Content | safeCSS }}</style>
- {{ end }}
- {{ with resources.Get "css/flexboxgrid-6.3.1.min.css" | minify }}
- <style>{{ .Content | safeCSS }}</style>
- {{ end }}
+ {{ partial "head/css" . }}
<!-- Extra head -->
{{ .Site.Params.extraHead | safeHTML }}
diff --git a/themes/yinyang/layouts/partials/head/css.html b/themes/yinyang/layouts/partials/head/css.html
index 3dbc6427..68d82a23 100644
--- a/themes/yinyang/layouts/partials/head/css.html
+++ b/themes/yinyang/layouts/partials/head/css.html
@@ -16,6 +16,14 @@ rel="stylesheet"
href="https://unpkg.com/@fancyapps/ui@5.0.36/dist/fancybox/fancybox.css"
/>
+<!-- theme css -->
+{{ with resources.Get "css/index.css" | minify }}
+<style>{{ .Content | safeCSS }}</style>
+{{ end }}
+{{ with resources.Get "css/flexboxgrid-6.3.1.min.css" | minify }}
+<style>{{ .Content | safeCSS }}</style>
+{{ end }}
+
<!-- Extra -->
{{ range .Site.Params.extraCSSFiles -}}
<link rel="stylesheet" href="{{ $.Site.Params.staticPrefix }}{{ . | relURL }}">