最近看到 GitHub 更新了黑暗模式(夜间模式),自己也心血来潮,给自己博客更新下样式。
本以为需要改的东西地方会很多,结果基本上就是在 SCSS 中设置好颜色变量,对需要改动的地方更新下新的颜色就行了,主要就是一些背景和文字的调和。
我目前是基于 prefers-color-scheme 这个 media query 来自动调用夜间模式的,黑白分明,也不会突然闪烁。
@media (prefers-color-scheme: dark) {
// TO-DO, colors in dark mode
}
先上线试试,或许以后会增加访客设置选项,不知道如何设置更好,有建议的朋友可以留言交流下。
林宏
Frank Lin
YOU MAY ALSO LIKE
Web Notes
2017.03.18
Syntax highlight with Rouge in Jekyll
By default, Jekyll 3 and versions above integrated with Rouge, a pure Ruby syntax highlighter which supports over 100 languages. Since Rouge themes are compatible with Pygments's stylesheets, it’s nice for us to choose a favourable style.
Tutorials
2019.12.05
Setting up snap Nextcloud on Ubuntu
Nextcloud, a fork of ownCloud, is a open-source file sharing server that allows you to store your personal content, like documents and pictures, in a centralized location, much like Dropbox. It also returns the control and security of your sensitive data back to you, thus eliminating the use of a third-party cloud hosting service. Here, I'm going to walk through the installing and configurations on Ubuntu 18.04 using the snappy packaging system.