#5 Added Darkmode JS for dialog #10

Merged
Paddy merged 3 commits from spiritsofmayhem-darkmode-patch into master 2021-10-13 12:01:52 +00:00
Showing only changes of commit ab4454afed - Show all commits

View File

@ -95,6 +95,13 @@ const toggleDarkMode = () => {
navElement.classList.toggle("nav--dark-mode"); navElement.classList.toggle("nav--dark-mode");
submitButton.classList.toggle("submitButton--dark-mode"); submitButton.classList.toggle("submitButton--dark-mode");
/* Dialog */
let modalContents = document.getElementsByClassName('modal-toggle')
for (content of modalContents) {
content.classList.toggle("modal--dark-mode")
}
if (colorModeToggleIcon.classList.contains("fa-moon")) { if (colorModeToggleIcon.classList.contains("fa-moon")) {
colorModeToggleIcon.classList.remove("fa-moon"); colorModeToggleIcon.classList.remove("fa-moon");
colorModeToggleIcon.classList.add("fa-sun"); colorModeToggleIcon.classList.add("fa-sun");