Update themes/mytheme/layouts/partials/header.html

This commit is contained in:
Morgan 2023-10-29 16:30:28 +09:00
parent 60f2f31692
commit 732568b090
1 changed files with 6 additions and 0 deletions

View File

@ -6,6 +6,9 @@
<script>
if (localStorage.getItem("pref-theme") === "dark") {
document.body.classList.add('dark');
{{- if site.Params.label.icon_inv }}
document.getElementById('main-logo').src = "{{site.Params.label.icon}}";
{{- end }}
}
</script>
@ -14,6 +17,9 @@
<script>
if (localStorage.getItem("pref-theme") === "light") {
document.body.classList.remove('dark')
{{- if site.Params.label.icon_inv }}
document.getElementById('main-logo').src = "{{site.Params.label.icon_inv}}";
{{- end }}
}
</script>