Update fetching icons urls

This commit is contained in:
Hazem Krimi
2023-11-03 23:34:39 +01:00
parent 8b7a3a6973
commit b2ae7e64aa
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ function loadTheme() {
root.style.setProperty('--text', theme === 'light' ? 'black' : 'white'); root.style.setProperty('--text', theme === 'light' ? 'black' : 'white');
root.style.setProperty('--color', theme === 'light' ? 'black' : 'white'); root.style.setProperty('--color', theme === 'light' ? 'black' : 'white');
fetch(`../icons/${theme === 'light' ? 'sun' : 'moon'}.svg`) fetch(`./../icons/${theme === 'light' ? 'sun' : 'moon'}.svg`)
.then((response) => response.text()) .then((response) => response.text())
.then((svg) => { .then((svg) => {
themeTogglers.forEach(themeToggler => { themeTogglers.forEach(themeToggler => {
+1 -1
View File
@@ -1,5 +1,5 @@
function loadBurger() { function loadBurger() {
fetch(`../icons/${burgerOpen ? 'close' : 'burger'}.svg`) fetch(`./../icons/${burgerOpen ? 'close' : 'burger'}.svg`)
.then((response) => response.text()) .then((response) => response.text())
.then((svg) => { .then((svg) => {
burgerPlaceholder.innerHTML = svg; burgerPlaceholder.innerHTML = svg;