From 16b25112b2eec8340ecc8aef2b69ac1254ee7aa6 Mon Sep 17 00:00:00 2001 From: xaoxuu Date: Fri, 2 Apr 2021 20:24:16 +0800 Subject: [PATCH] css --- _config.yml | 5 +- layout/_partial/scripts/index.ejs | 3 - layout/_partial/sidebar/index.ejs | 2 +- layout/_partial/sidebar/widgets/toc.ejs | 3 - layout/layout.ejs | 2 +- source/css/_common/blur.styl | 8 +- source/css/_common/title.styl | 2 +- source/css/_custom.styl | 28 ++++--- source/css/_defines/theme.styl | 72 +++++++--------- source/css/_layout/layout.styl | 2 +- source/css/_layout/main.styl | 36 ++++---- source/css/_layout/md.styl | 4 +- source/css/_layout/sidebar/footer.styl | 3 + source/css/_layout/sidebar/sidebar.styl | 2 +- source/css/_layout/sidebar/toc.styl | 14 ++-- source/css/_layout/tag-plugins/checkbox.styl | 14 ++-- source/css/_layout/tag-plugins/common.styl | 87 ++++++++++---------- source/css/_plugins/comments/valine.styl | 21 ++--- source/js/main.js | 8 -- source/js/plugins/darkmode.js | 6 -- 20 files changed, 153 insertions(+), 169 deletions(-) delete mode 100644 source/js/plugins/darkmode.js diff --git a/_config.yml b/_config.yml index 84e8ace..c10d510 100755 --- a/_config.yml +++ b/_config.yml @@ -168,9 +168,8 @@ plugins: interval: 100 # ms scale: 1 # 0.1~1 - darkmode: - enable: #true - js: /js/plugins/darkmode.js +style: + darkmode: auto # set 'auto' to enable, set 'false' to disable default: avatar: https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/avatar/round/3442075.svg diff --git a/layout/_partial/scripts/index.ejs b/layout/_partial/scripts/index.ejs index 1fc76a5..4cd90bb 100644 --- a/layout/_partial/scripts/index.ejs +++ b/layout/_partial/scripts/index.ejs @@ -121,9 +121,6 @@ if ('<%- theme.plugins.preload.enable %>' == 'true') { stellar.plugins.preload = Object.assign(<%- JSON.stringify(theme.plugins.preload) %>); } - if ('<%- theme.plugins.darkmode.enable %>' == 'true') { - stellar.plugins.darkmode = Object.assign(<%- JSON.stringify(theme.plugins.darkmode) %>); - } diff --git a/layout/_partial/sidebar/index.ejs b/layout/_partial/sidebar/index.ejs index ac92187..6b27d86 100755 --- a/layout/_partial/sidebar/index.ejs +++ b/layout/_partial/sidebar/index.ejs @@ -2,7 +2,7 @@ // 默认组件 if (page.sidebar == undefined) { if (page.layout == 'post' && page.content) { - page.sidebar = ['toc', 'recent']; + page.sidebar = ['toc']; } else if (page.layout == 'wiki' && page.content) { page.sidebar = ['toc', 'wiki_more']; } else { diff --git a/layout/_partial/sidebar/widgets/toc.ejs b/layout/_partial/sidebar/widgets/toc.ejs index a275c15..ea6a9fb 100644 --- a/layout/_partial/sidebar/widgets/toc.ejs +++ b/layout/_partial/sidebar/widgets/toc.ejs @@ -30,9 +30,6 @@ function layout_toc() { <%- __('meta.toc') %> <% } %> - - -
<% if (page.layout == 'wiki' && page.wiki) { %> diff --git a/layout/layout.ejs b/layout/layout.ejs index 6db6815..244c1fa 100755 --- a/layout/layout.ejs +++ b/layout/layout.ejs @@ -1,7 +1,7 @@ <%- partial('_partial/head') %> - + <%- partial('_partial/main/article/wiki_cover') %>