Project information

  • Category: Javascript Project
  • Client: Alexandru Becher
  • Project date: September, 2021

Using CSS and Javascript I made a small landing page that have mainly a button that do switch between dark and light mode:

  • Use function for replace dark images with light images;
  • Use querySelector to search for 'input' in HTML insead of using getElementById;
  • Use localStorage to set a key and value to check later for the theme launch;
  • Use scroll-behavior in CSS to actually scroll smooth the nav buttons;
  • Use variables in CSS to easily change between dark and light colors using Javascript;
  • Use replace from classList to replace icons near switch button;