How can I change whole site color with toggle a button

Please see the code below I got some error!

import wixSite from ‘wix-site’ ;
$w . onReady ( function () {
const currentPath = www . danmaxwix . wixsite . com /website-6/ ; //it will show you an error red line on the editor - you should ignore it.
$w ( ‘#darkModeSwitch’ ). onChange ( function () {
if ( $w ( ‘#darkModeSwitch’ ). checked ) {
$w ( ‘Document’ ). background . src = ‘https://dummyimage.com/1/333333’ ;
$w ( ‘#darkModeState’ ). text = ‘Dark Mode On’ ;
if ( currentPath === ‘/https://danmaxwix.wixsite.com/website-6’ ){
$w ( ‘#emailIcon’ ). src = ‘https://static.wixstatic.com/media/d04120_2cd897ba7a2246a396bfa8a23dad40ef~mv2.png’ ; //it will show you an error red line on the editor - you should ignore it.
}
} else {
$w ( ‘Document’ ). background . src = “https://static.wixstatic.com/media/d04120_2636c2ad09774cd597ccfb1e9f929e25~mv2.png” ;
$w ( ‘#darkModeState’ ). text = ‘Dark Mode Off’ ;
if ( currentPath === ‘/https://danmaxwix.wixsite.com/website-6’ ){
$w ( ‘#emailIcon’ ). src = ‘https://static.wixstatic.com/media/d04120_a2f9e9ccd89744d5af2cd1e4bb652e6b~mv2.jpg’ ; //it will show you an error red line on the editor - you should ignore it.
}
}
});
});

My icon is in the home page which is: https://danmaxwix.wixsite.com/website-6

Please see the link:https://danmaxwix.wixsite.com/website-6/about

when I toggle the button the center of page doesn’t change!