|
|
|
@ -45,8 +45,8 @@ defmodule DecentralisedBookIndexWeb.Components.MyComponents.DarkModeSwitcher do
|
|
|
|
|
const themeToggleLightIcon = document.getElementById('theme-toggle-light-icon');
|
|
|
|
|
if (themeToggleDarkIcon != null && themeToggleLightIcon != null) {
|
|
|
|
|
let dark = document.documentElement.classList.contains('dark');
|
|
|
|
|
const show = dark ? themeToggleDarkIcon : themeToggleLightIcon
|
|
|
|
|
const hide = dark ? themeToggleLightIcon : themeToggleDarkIcon
|
|
|
|
|
const show = dark ? themeToggleLightIcon : themeToggleDarkIcon;
|
|
|
|
|
const hide = dark ? themeToggleDarkIcon : themeToggleLightIcon;
|
|
|
|
|
show.classList.remove('hidden', 'text-transparent');
|
|
|
|
|
hide.classList.add('hidden', 'text-transparent');
|
|
|
|
|
}
|
|
|
|
|