I wanted to make a dark & light theme system for my website but it is not working correctly.
I made a switch in wich you can toggle dark or light mode.
<input type="checkbox" id="slider">
It was kinda working, but it worked only for the header(header file is added across all pages). I don’t know how I can fix it, I tried to make it via JS but I’m not good at it. I know that it has to be done with localStorage or with cookies, but I don’t understand anything of this.
Can someone help me out?