Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added an option to have a darkmode in the documentation. The option is based on the implementation from GoogleChromeLabs https://github.com/GoogleChromeLabs/dark-mode-toggle.
At the moment this option is only available if using the W3CStyle.
Motivation
I am more of a night owl and as I am building my ontology at night the white background bothers me. I tried to give a quick shot and it looks good at first glance.
Details
What I changed is
I tried to make at as less invasive as possible and ended up with a slider that is at the left bottom part of the html:
And this is how it looks in action
To test the changes, the documentation has to be loaded over a server as the dark mode java script from google gives the error
Access to script at 'file:///DOC_SOURCE_PATH/dark-mode-toggle.mjs' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, isolated-app, chrome-extension, chrome, https, chrome-untrusted.