From 0a08ee920cbd8ec9b5a8a4042da6d6677c6b68aa Mon Sep 17 00:00:00 2001 From: Morgan Date: Sun, 29 Oct 2023 11:58:42 +0900 Subject: [PATCH] edited post --- themes/mytheme/assets/css/core/theme-vars.css | 1 - themes/mytheme/layouts/partials/footer.html | 8 ++++++++ themes/mytheme/layouts/partials/header.html | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/themes/mytheme/assets/css/core/theme-vars.css b/themes/mytheme/assets/css/core/theme-vars.css index ce9e139..4ef6624 100644 --- a/themes/mytheme/assets/css/core/theme-vars.css +++ b/themes/mytheme/assets/css/core/theme-vars.css @@ -18,7 +18,6 @@ } .dark { - --theme: #242424; --entry: rgb(46, 46, 51); --primary: rgb(218, 218, 219); --secondary: rgb(155, 156, 157); diff --git a/themes/mytheme/layouts/partials/footer.html b/themes/mytheme/layouts/partials/footer.html index d0066ef..8c76247 100644 --- a/themes/mytheme/layouts/partials/footer.html +++ b/themes/mytheme/layouts/partials/footer.html @@ -70,9 +70,17 @@ if (document.body.className.includes("dark")) { document.body.classList.remove('dark'); localStorage.setItem("pref-theme", 'light'); + {{- if site.Params.label.icon_dark }} + document.body.getElementById('main-logo').src = "{{site.Params.label.icon}}"; + {{- end }} + } else { document.body.classList.add('dark'); localStorage.setItem("pref-theme", 'dark'); + {{- if site.Params.label.icon_dark }} + document.body.getElementById('main-logo').src = "{{site.Params.label.icon_dark}}"; + {{- end }} + } }) diff --git a/themes/mytheme/layouts/partials/header.html b/themes/mytheme/layouts/partials/header.html index da83c76..a93101d 100644 --- a/themes/mytheme/layouts/partials/header.html +++ b/themes/mytheme/layouts/partials/header.html @@ -5,7 +5,7 @@ {{- if site.Title }} {{- if site.Params.label.icon }} - {{- end -}} {{- else }} @@ -14,7 +14,7 @@
{{- if (not site.Params.disableThemeToggle) }} -