Hi! I found your great theme, and tried to add an experimental dark mode support using CSS filters, which uses the system dark mode setting as default value while also remembering users' manual preference. Users can toggle dark mode using the little "sun/moon" icon in the navbar. Previously I am thinking just using the custom CSS support built in the theme, but I feel that this should be a theme-level support for such an essential function.
Still I would like some response, to see if I am working towards the right direction. I am mostly a backend developer and haven't touch frontend code much, so please don't hesitate to provide editing suggestions.
Here are some screenshots:
Home Page
Article Page (Notice that images are not effected)
Hi! I found your great theme, and tried to add an experimental dark mode support using CSS filters, which uses the system dark mode setting as default value while also remembering users' manual preference. Users can toggle dark mode using the little "sun/moon" icon in the navbar. Previously I am thinking just using the custom CSS support built in the theme, but I feel that this should be a theme-level support for such an essential function.
Most of the code comes from this post: https://radu-matei.com/blog/dark-mode/ , and the moon & sun icon is from font-awesome. As font-awesome requires credit link to their license page, there may need some work on
README.md
to include that.Still I would like some response, to see if I am working towards the right direction. I am mostly a backend developer and haven't touch frontend code much, so please don't hesitate to provide editing suggestions.
Here are some screenshots:
Home Page
Article Page (Notice that images are not effected)
Code highlight & Code block