hexo-theme-landscape
hexo-theme-landscape copied to clipboard
Dark mode
It will be best if the default theme has a dark mode, and auto switching between dark and light due to system settings.
You can try this one: https://github.com/sandoche/Darkmode.js Change color scheme of this theme may require many human effort
You can try this one: https://github.com/sandoche/Darkmode.js Change color scheme of this theme may require many human effort
Excuse me, but how to put this in use in hexo build process?
I tried inserting following code to layout/index.ejs
. It looks not very ideal, only the background behind article is black, the article block is still original.
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/darkmode-js.min.js"></script>
<script>
function addDarkmodeWidget() {
new Darkmode().showWidget();
}
window.addEventListener('load', addDarkmodeWidget);
</script>