diff --git a/src/main/resources/static/js/darkmode.js b/src/main/resources/static/js/darkmode.js index fe239583..ebf9c683 100644 --- a/src/main/resources/static/js/darkmode.js +++ b/src/main/resources/static/js/darkmode.js @@ -16,6 +16,8 @@ function getElements() { } function setMode(mode) { + var event = new CustomEvent('modeChanged', { detail: mode }); + document.dispatchEvent(event); elements.lightModeStyles.disabled = mode !== "off"; elements.darkModeStyles.disabled = mode !== "on"; elements.rainbowModeStyles.disabled = mode !== "rainbow"; diff --git a/src/main/resources/templates/fragments/langAndDarkMode.html b/src/main/resources/templates/fragments/langAndDarkMode.html deleted file mode 100644 index 8c6b0ea3..00000000 --- a/src/main/resources/templates/fragments/langAndDarkMode.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/src/main/resources/templates/fragments/languages.html b/src/main/resources/templates/fragments/languages.html new file mode 100644 index 00000000..17b88660 --- /dev/null +++ b/src/main/resources/templates/fragments/languages.html @@ -0,0 +1,56 @@ + + + icon العربية + + + icon Català + + + icon 简体中文 + + + icon Deutsch + + + icon English (GB) + + + icon English (US) + + + icon Euskara + + + icon Español + + + icon Français + + + icon Italiano + + + icon Nederlands + + + icon Polski + + + icon Português (BR) + + + icon Romanian + + + icon Svenska + + + icon Русский + + + icon 한국어 + + + icon 日本語 + + \ No newline at end of file diff --git a/src/main/resources/templates/fragments/navbar.html b/src/main/resources/templates/fragments/navbar.html index 009445e8..4326afcc 100644 --- a/src/main/resources/templates/fragments/navbar.html +++ b/src/main/resources/templates/fragments/navbar.html @@ -147,7 +147,27 @@ - + + + + + + + +