You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a fan of dark mode, I thought it would be nice to have a configuration option to set dark mode on initial page load. I started looking into how to implement it, but thought I would open a "feature request" just in case.
The text was updated successfully, but these errors were encountered:
Would you like to always enable dark mode, without providing the toggle button to the user? Or should dark be the default but the user should be allowed to disable it?
The latter. I was thinking something like a config variable that added class="dark-mode" or class="light-mode" to the template and having the javascript check for the class, but I just realized that would require making another manual edit to the templates generated by Doxygen.
The script in doxygen-awesome-darkmode-toggle.js reads a value from the local storage at page load to determine if it should enable dark mode. You could write a custom script that sets the key prefers-dark-mode-in-light-mode on the users first page visit, remembering if you did so in another key:
Disclaimer: This is not a decent solution but more of a workaround for your requirement. It does also require the template to be edited (for adding the script). I've not tested if this works, but in my head it does 😉)
As a fan of dark mode, I thought it would be nice to have a configuration option to set dark mode on initial page load. I started looking into how to implement it, but thought I would open a "feature request" just in case.
The text was updated successfully, but these errors were encountered: