![]() ![]() Window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', event => else if (window.matchMedia("(prefers-color-scheme: dark)"). Responsive Dark Mode theme built with Bootstrap 5 with Dark Mode toggle button that switches between dark and light themes. Var colorScheme // Variable to know if in dark or light mode My dark_mode.js file looks like this console.log("loaded dark_mode.js") Create a Bootstrap switch to toggle between Dark Mode and Light Mode. You can also initialize the dark mode toggler via JavaScript. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |