Closed mcraveiro closed 3 years ago
Hi Marco, First of all, I'm happy to hear that you like my work! Thank you for your feedback! :)
Short answer: It's currently not possible but I will work on it!
I can think of two ways to resolve this:
Both solutions require some adjustments to the current theme, so you'll need to stay tuned or work it out yourself. :)
Would you be fine with just permanently choosing a dark theme for you website, or would you prefer to give the user the choice to switch between light-/dark-mode?
Hi @jothepro,
thanks for the prompt reply. Well to be completely honest, I can live with the light theme - it was only that you mentioned there was a dark theme, so then suddenly I was keen on having it :-) but all and all, the light theme is already an improvement from plain Doxygen, so really I can live with that. But in an ideal world, I think having a way to switch between light and dark would be the better option methinks.
@mcraveiro
If for the time being, if you want to enable the dark theme in the css, I just changed all the lines that said
@media (prefers-color-scheme: dark)
to @media (prefers-color-scheme: light)
.
disclaimer: I know hardly anything about HTML/CSS, and have no clue what this actually does, I was honestly surprised that it worked.
Hi,@jothepro
I thinks that you can use cookie to save user's theme choice.
And pass that cookie value to css through the css variable(more detail in here https://stackoverflow.com/questions/50037400/pass-a-value-from-html-to-css)
And use the js file through HTML_HEADER
or HTML_FOOTER
to add a button to page and control that varible and cookie.
The button also can be look like a float button when the page do not has a header.
like this:
I have finally added support for manually switching to dark mode in commit https://github.com/jothepro/doxygen-awesome-css/commit/072e779b1aa0ad298b2410882c392feb8b0fae5c 👏
Pls let me know what you think about it! This got quite a complex feature to add and your feedback helps me a lot to get this stable enough for the next release!
Works great I incorporated it into my docs site: https://rapidcode.roboticsys.com/
Thanks!
Thanks for you feedback. I consider this issue resolved for now.
Hi doxygen-awesome developers,
thanks for an excellent and very easy to use theme. I just updated my documentation to use it, and it took me 5 seconds to do so, which is amazing :-) As I was mentioning on our reddit discussion [1], I have one slight snag though: I prefer using dark mode wherever possible and I've noticed two issues with the automatic detection of dark mode:
Is there a way I could put a link on the main page for the dark mode version of the theme somehow?
Many thanks for your time.
[1] dxoygen (sic.) awesome css : make your doxygen docs looking more modern [2] Dogen documentation