Add Night Mode support for NexT.
Try scheme Mist for now, since nightmode.styl lacks much...
This plugin has been released to GitHub Package Registry and you can choose one of the following ways to install it.
npm i 1v9/hexo-next-nightmodeIf the above installation failed, please try:
npm i 1v9/hexo-next-nightmode#masternpm i https://github.com/1v9/hexo-next-nightmodeYou need to configure authToken for GPR by yourself
npm config set @1v9:registry=https://npm.pkg.github.com
npm i @1v9/hexo-next-nightmodeTry pressing Alt + X to toggle the mode, it's same as clicking sidebar button.
You can add follow options in hexo or theme _config.yml.
next_nightmode:
enable: false
# FontAwesome or ForkAwesome icon in sidebar button.
icon: lightbulb-o
# Text for sidebar button.
text: Night Mode
# If true, when you disable Night Mode, Hexo will show warning messages in your console.
reminder: false
# Debugger for alpha option below.
debugger: false
# Support experimental prefers-color-scheme media query.
# For now if alpha mode enabled, sidebar button will be disabled.
# The only way to toggle night mode is changing your device scheme.
# Also see: https://caniuse.com/#feat=prefers-color-scheme.
alpha: falseNexT supports customizing styles, so you can custom dark mode style by yourself, check css/scheme.styl then do your job.
Also if you don't like this plugin based on JavaScript, you can use a simple CSS method.
@media (prefers-color-scheme: dark) {
/* do everything yo want */
}