edited post

This commit is contained in:
Morgan 2023-10-29 12:02:38 +09:00
parent 73df1eb355
commit dbf39fc646
1 changed files with 2 additions and 2 deletions

View File

@ -70,14 +70,14 @@
if (document.body.className.includes("dark")) { if (document.body.className.includes("dark")) {
document.body.classList.remove('dark'); document.body.classList.remove('dark');
localStorage.setItem("pref-theme", 'light'); localStorage.setItem("pref-theme", 'light');
{{- if site.Params.label.icon_dark }} {{- if site.Params.label.icon_inv }}
document.getElementById('main-logo').src = "{{site.Params.label.icon}}"; document.getElementById('main-logo').src = "{{site.Params.label.icon}}";
{{- end }} {{- end }}
} else { } else {
document.body.classList.add('dark'); document.body.classList.add('dark');
localStorage.setItem("pref-theme", 'dark'); localStorage.setItem("pref-theme", 'dark');
{{- if site.Params.label.icon_dark }} {{- if site.Params.label.icon_inv }}
document.getElementById('main-logo').src = "{{site.Params.label.icon_inv}}"; document.getElementById('main-logo').src = "{{site.Params.label.icon_inv}}";
{{- end }} {{- end }}