Udemy JavaScript Web Projects: 20 Projects to Build Your Portfolio. See https://www.udemy.com/course/javascript-web-projects-to-build-your-portfolio-resume/?src=sac&kw=javascript+web+projects
Section 6 - Light-Dark Mode
Example of the webpage is at https://waihoh.github.io/light-dark-mode/