Closed vChavezB closed 10 months ago
Very cool! Thanks. Will have a look this week. I like to space out the releases a bit, but you are adding so many things that it's getting hard not to create a new one ;)
No problem, whenever I am adding features I am glad to make contributions back 😉Here is another update on how it looks with the latest commits
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.