var switchTumblerHandler = () => {
var wrapper = document.querySelector('.tumbler__wrapper')
wrapper.addEventListener('click', () => {
toggleNightMode()
})
}
var toggleNightMode = () => {
document.body.classList.toggle('body--night-mode')
document.querySelector('.tumbler').classList.toggle('tumbler--night-mode')
document.querySelector('.card').classList.toggle('card--night-mode')
document.querySelectorAll('.navItem').forEach(post => {
post.classList.toggle('navItem--night-mode')
})
document.querySelectorAll('.button').forEach(post => {
post.classList.toggle('button--night-mode')
})
document.querySelectorAll('.icon').forEach(post => {
post.classList.toggle('icon--night-mode')
})
document.querySelectorAll('.title').forEach(post => {
post.classList.toggle('subtitle--night-mode')
})
document.querySelectorAll('.subtitle').forEach(post => {
post.classList.toggle('subtitle--night-mode')
})
}
switchTumblerHandler()