I have metronics 8 for Django web app. how can i tell if a user is on dark mode or light mode in html/js or Django views?
To detect if a user is in dark mode or light mode, you can use JavaScript. Here's a code snippet that you can use:
https://gist.github.com/faizalmy/6ddeebfbfc3139166c086d112792a4e9
This JavaScript code checks if the user's browser has dark mode enabled by using the window.matchMedia API.
You can place this JavaScript code in your HTML template or include it in your JavaScript files as needed.
If you have any further questions or need additional assistance, please feel free to ask.
Thanks