Desktop header

This commit is contained in:
Hazem Krimi
2023-10-31 23:51:54 +01:00
parent 4e31b2877b
commit c463e30f43
12 changed files with 60 additions and 27 deletions
+7
View File
@@ -34,6 +34,13 @@ function updateTheme(theme) {
);
root.style.setProperty('--text', theme === 'light' ? 'black' : 'white');
root.style.setProperty('--color', theme === 'light' ? 'black' : 'white');
fetch(`../icons/${theme === 'light' ? 'sun' : 'moon'}.svg`)
.then((response) => response.text())
.then((svg) => {
document.querySelector('#theme-toggle').innerHTML = svg;
})
.catch(() => {})
}
const root = document.documentElement;