Skip to content

Commit

Permalink
solution move switcher
Browse files Browse the repository at this point in the history
  • Loading branch information
taniaisthatyou committed Sep 9, 2024
1 parent 21fbe68 commit 8409060
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ const page = document.querySelector('.page');
const switcher = document.querySelector('.theme-switcher');

switcher.addEventListener('click', ( ) => {
switcher.classList.toggle('theme-switcher--dark');

if (page.classList.contains('page--theme--dark')) {
page.classList.remove('page--theme--dark');

Expand Down

0 comments on commit 8409060

Please sign in to comment.