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') %>