From ac0478cf06bbb073cee2ea338433d375c0310b16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=86=E7=93=9C=E4=BA=91?= Date: Tue, 5 Sep 2023 17:23:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0nightTheme=E5=92=8CdayTheme?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/base.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/base.html b/templates/base.html index f9c9282..e1320a1 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,5 +1,5 @@ - + @@ -8,8 +8,8 @@ {% block head %}{% endblock %} @@ -46,13 +46,13 @@ else if(localStorage.getItem("meek_theme")=="dark"){changeDark();} else if(localStorage.getItem("meek_theme")=="light"){changeLight();} function changeDark(){ - document.getElementsByTagName("html")[0].attributes.getNamedItem("data-color-mode").value="{{ blogBase['nightTheme'] }}"; + document.getElementsByTagName("html")[0].attributes.getNamedItem("data-color-mode").value="dark"; document.getElementById("themeSwitch").setAttribute("d",value=IconList["moon"]); document.getElementById("themeSwitch").parentNode.style.color="#00f0ff"; if(utterancesLoad==1){utterancesTheme("dark-blue");} } function changeLight(){ - document.getElementsByTagName("html")[0].attributes.getNamedItem("data-color-mode").value="{{ blogBase['dayTheme'] }}"; + document.getElementsByTagName("html")[0].attributes.getNamedItem("data-color-mode").value="light"; document.getElementById("themeSwitch").setAttribute("d",value=IconList["sun"]); document.getElementById("themeSwitch").parentNode.style.color="#ff5000"; if(utterancesLoad==1){utterancesTheme("github-light");}