Update themes/mytheme/layouts/partials/header.html
This commit is contained in:
parent
60f2f31692
commit
732568b090
|
@ -6,6 +6,9 @@
|
||||||
<script>
|
<script>
|
||||||
if (localStorage.getItem("pref-theme") === "dark") {
|
if (localStorage.getItem("pref-theme") === "dark") {
|
||||||
document.body.classList.add('dark');
|
document.body.classList.add('dark');
|
||||||
|
{{- if site.Params.label.icon_inv }}
|
||||||
|
document.getElementById('main-logo').src = "{{site.Params.label.icon}}";
|
||||||
|
{{- end }}
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -14,6 +17,9 @@
|
||||||
<script>
|
<script>
|
||||||
if (localStorage.getItem("pref-theme") === "light") {
|
if (localStorage.getItem("pref-theme") === "light") {
|
||||||
document.body.classList.remove('dark')
|
document.body.classList.remove('dark')
|
||||||
|
{{- if site.Params.label.icon_inv }}
|
||||||
|
document.getElementById('main-logo').src = "{{site.Params.label.icon_inv}}";
|
||||||
|
{{- end }}
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue