From 53017ab857fae1d68594a8ac0d92b3fac640f6bb Mon Sep 17 00:00:00 2001 From: xaoxuu Date: Sun, 7 Apr 2019 14:32:13 +0800 Subject: [PATCH] update --- _config.yml | 6 +++--- layout/_partial/cover.ejs | 4 ++-- source/js/app.js | 6 ++++-- source/less/_toc.less | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/_config.yml b/_config.yml index 1c6857c..713b258 100755 --- a/_config.yml +++ b/_config.yml @@ -4,10 +4,10 @@ info: docs: https://xaoxuu.com/wiki/material-x/ cdn: # 把对应的那一行注释掉就使用本地的文件 css: - style: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@19.4.16/css/style.css + style: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@19.4.17/css/style.css js: - app: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@19.4.16/js/app.js - search: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@19.4.16/js/search.js + app: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@19.4.17/js/app.js + search: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@19.4.17/js/search.js volantis: https://cdn.jsdelivr.net/gh/xaoxuu/volantis@1/js/volantis.min.js diff --git a/layout/_partial/cover.ejs b/layout/_partial/cover.ejs index a2f148f..b457da6 100644 --- a/layout/_partial/cover.ejs +++ b/layout/_partial/cover.ejs @@ -26,8 +26,8 @@ if (theme.cover) { <%- partial('../_cover/search') %> <% } %> - <%- partial('header', null, {cache: !config.relative_link, path: path}) %> + <%- partial('header', null, {cache: false, path: path}) %> <% } else { %> - <%- partial('header', null, {cache: !config.relative_link, path: path}) %> + <%- partial('header', null, {cache: false, path: path}) %> <% } %> diff --git a/source/js/app.js b/source/js/app.js index 7c1fb0b..8cce787 100755 --- a/source/js/app.js +++ b/source/js/app.js @@ -123,8 +123,10 @@ var customSearch; index = index[0]; idname = idname.split(index)[0]; } - $active_link = $('#' + idname, $headerMenu); - setUnderline($active_link); + if (idname && $headerMenu) { + $active_link = $('#' + idname, $headerMenu); + setUnderline($active_link); + } } function setHeaderMenuPhone() { diff --git a/source/less/_toc.less b/source/less/_toc.less index 0dd196d..2acdb1a 100755 --- a/source/less/_toc.less +++ b/source/less/_toc.less @@ -11,7 +11,7 @@ top: 0; } .content{ - padding: @gap/2 0; + padding: @gap/2 0 @gap 0; max-height: 500px; overflow: auto; &.pure{