Hey there! 👋 Welcome to the Mode Switching Website. This project is a fun way to toggle between light and dark modes using a stylish custom switch button. It's built with HTML, CSS, and a bit of JavaScript to give you a smooth experience. The switch is right in the center of the screen, making it easy to use.
- Switch Modes: Flip between light and dark themes with a neat switch.
- Keeps Your Choice: Your mode preference is saved using
localStorage
, so you won’t lose it when you reload or revisit the page. - Responsive and Centered: The switch button is centered and adapts well to different screen sizes.
Want to try it out on your own machine? Here’s how:
- Just a web browser is all you need. Chrome, Firefox, or Edge will do the trick.
-
Clone the Repository
Open your terminal and run:
git clone https://github.com/ayushmaninbox/dark-mode.git
-
Go to the Project Folder
cd dark-mode
-
Open It in Your Browser
Simply open the
index.html
file in your browser to see it in action!
- Switch It Up: Click the switch to change between light and dark modes.
- Preference Saved: Your choice sticks around thanks to
localStorage
.
Want to tweak things? Here’s how you can:
- Move the Switch: Adjust the
.mode-switcher
class instyles.css
to reposition the switch button. - Change the Look: Dive into
styles.css
to modify colors and styles to fit your taste.
Got questions or suggestions? Drop me a line!
- Email: [email protected]
- GitHub: ayushmaninbox
This project is licensed under the MIT License - see below for details:
MIT License
Copyright (c) 2024 ayushmaninbox
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Thanks for checking out the project! I hope you enjoy playing around with it. 😊