From ca1d49e59200bc5fd995c6cdae0ed7dd7018f78a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=A1=E6=A2=A6=E6=98=9F=E5=B0=98?= Date: Thu, 12 May 2022 11:32:25 +0800 Subject: [PATCH] :building_construction: Update the CSS style with theme scheme name. --- assets/css/{style_gemini.css => gemini/style.css} | 0 layouts/partials/head/css.html | 8 +++++--- static/css/{main_gemini.css => gemini/main.css} | 0 static/css/{a_hover.css => hover.css} | 0 4 files changed, 5 insertions(+), 3 deletions(-) rename assets/css/{style_gemini.css => gemini/style.css} (100%) rename static/css/{main_gemini.css => gemini/main.css} (100%) rename static/css/{a_hover.css => hover.css} (100%) diff --git a/assets/css/style_gemini.css b/assets/css/gemini/style.css similarity index 100% rename from assets/css/style_gemini.css rename to assets/css/gemini/style.css diff --git a/layouts/partials/head/css.html b/layouts/partials/head/css.html index 13b7258..94f010d 100644 --- a/layouts/partials/head/css.html +++ b/layouts/partials/head/css.html @@ -1,7 +1,9 @@ - -{{- $style := resources.Get "css/style_gemini.css" | resources.ExecuteAsTemplate "css/style_gemini.css" . }} +{{- $scheme := lower .Site.Params.scheme }} +{{- $styleScheme := (printf "css/%s/style.css" $scheme) }} + +{{- $style := resources.Get $styleScheme | resources.ExecuteAsTemplate $styleScheme . }} - \ No newline at end of file + \ No newline at end of file diff --git a/static/css/main_gemini.css b/static/css/gemini/main.css similarity index 100% rename from static/css/main_gemini.css rename to static/css/gemini/main.css diff --git a/static/css/a_hover.css b/static/css/hover.css similarity index 100% rename from static/css/a_hover.css rename to static/css/hover.css