Set dark mode on by default
Is there a way to set the theme localStorage variable to 'dark' by default for everyone, instead of 'system'?
My website has a dark color, not switchable. If someone has light mode in the system, and tries to log in, it would blind them permanently π
Of course if it's not possible, I'll edit the base bg colors in css to dark ones, but would be nice to still have the light mode option, although not as the default.
8 Replies
I figured out something for it:
In the panelprovider, put this:
In the file, simply put this:
I'm not sure why, but I cannot mark this as the solution, there is no Apps option after right click
Actually this is much better:
Saw this earlier. Got distracted, then the day happened. Totally slipped my mind. Sorry. Glad you found the answer though.
yes it work but it remove the option to use light mode?
If your aim is to force it but have the option, then you could try my first method making a renderHook and add that script to the header or end of body
where can i check that sample method?
here
also you need to have $panel->darkmode(true) for it I think, so only with one true not two