a zola theme
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

14 lines
375 B

let placeholder = document.getElementById('theme-toggle-placeholder');
if (placeholder) {
let toggle = document.createElement("span");
toggle.id = "theme-toggle";
toggle.addEventListener("click", () => {
toggle_theme_pref();
update_theme();
update_theme_toggle();
});
placeholder.replaceWith(toggle);
update_theme_toggle();
}