|
@@ -3,9 +3,11 @@ axios.defaults.withCredentials = true;
|
|
|
let appearance = {};
|
|
|
|
|
|
appearance.sheetElement = null;
|
|
|
+appearance.textElement = null;
|
|
|
|
|
|
appearance.prepare = () => {
|
|
|
appearance.sheetElement = document.getElementById('appearance-sheet');
|
|
|
+ appearance.textElement = document.getElementById('appearance-text');
|
|
|
let lightbulb = document.getElementById('appearance-switch');
|
|
|
lightbulb.addEventListener('click', appearance.toggleLightMode);
|
|
|
};
|
|
@@ -17,6 +19,7 @@ appearance.toggleLightMode = (e) => {
|
|
|
let newStyle = res.data.currentStyle;
|
|
|
appearance.sheetElement.setAttribute("href", `/css/style_${newStyle}.css`);
|
|
|
appearance.currentStyle = newStyle;
|
|
|
+ appearance.textElement.textContent = newStyle;
|
|
|
});
|
|
|
};
|
|
|
|