From baa6f72d3528ab791102ad08d069a10c0eda6241 Mon Sep 17 00:00:00 2001
From: Jerry <16351105+jerryc127@users.noreply.github.com>
Date: Sat, 20 Jun 2020 13:58:59 +0800
Subject: [PATCH] =?UTF-8?q?:bug:=20=E4=BF=AE=E5=BE=A9=E9=83=A8=E5=88=86?=
=?UTF-8?q?=E8=A8=AD=E5=82=99=E9=81=87=E5=88=B0mobile-sidebar=E7=84=A1?=
=?UTF-8?q?=E6=B3=95=E6=BB=BE=E5=8B=95=E7=9A=84bugs=20:bug:=20=E4=BF=AE?=
=?UTF-8?q?=E5=BE=A9BUTTON=E6=A8=99=E7=B1=A4=E5=B5=8C=E5=A5=97=E4=BD=BF?=
=?UTF-8?q?=E7=94=A8=E5=9C=A8=E5=85=B6=E4=BB=96=E6=A8=99=E7=B1=A4=E6=99=82?=
=?UTF-8?q?=EF=BC=8C=E7=94=9F=E6=88=90=E5=A4=9A=E4=BA=86br=E6=A8=99?=
=?UTF-8?q?=E7=B1=A4=E8=80=8C=E5=B0=8E=E8=87=B4=E6=A8=A3=E5=BC=8F=E4=B8=8D?=
=?UTF-8?q?=E5=90=8C=E7=9A=84bugs=20:bug:=20=E4=BF=AE=E5=BE=A9=E6=96=87?=
=?UTF-8?q?=E7=AB=A0front-matter=E7=9A=84highlight=5Fshrink=E5=92=8Ctoc?=
=?UTF-8?q?=E7=82=BA=E7=A9=BA=E6=99=82=EF=BC=8C=E6=9C=83=E5=87=BA=E7=8F=BE?=
=?UTF-8?q?js=E5=A0=B1=E9=8C=AF=E7=9A=84bugs?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
layout/includes/head/config_site.pug | 4 ++--
package.json | 2 +-
scripts/tags/button.js | 3 +--
source/css/_layout/mobile-sidebar.styl | 3 ++-
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/layout/includes/head/config_site.pug b/layout/includes/head/config_site.pug
index 01417ab..84167e8 100644
--- a/layout/includes/head/config_site.pug
+++ b/layout/includes/head/config_site.pug
@@ -1,10 +1,10 @@
-
let isHighlightShrink
if (theme.highlight_shrink == 'none') isHighlightShrink = 'undefined'
- else if (page.highlight_shrink !== undefined) isHighlightShrink = page.highlight_shrink
+ else if (page.highlight_shrink !== null && page.toc !== undefined ) isHighlightShrink = page.highlight_shrink
else isHighlightShrink = theme.highlight_shrink
- const pageToc = page.toc !== undefined ? page.toc : theme.toc.enable
+ const pageToc = page.toc !== null && page.toc !== undefined ? page.toc : theme.toc.enable
const showToc = is_post() && pageToc && (toc(page.content) !== '' || page.encrypt == true )
-
diff --git a/package.json b/package.json
index 63a21cd..641ee07 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "hexo-theme-butterfly",
- "version": "3.0.0",
+ "version": "3.0.0-rc-1",
"private": true,
"engines": {
"node": ">=8.10.0"
diff --git a/scripts/tags/button.js b/scripts/tags/button.js
index 4386cea..8e7ea43 100644
--- a/scripts/tags/button.js
+++ b/scripts/tags/button.js
@@ -21,8 +21,7 @@ function btn (args) {
icon = icon.trim()
option = option.trim()
- return `
- ${icon.length > 0 ? `` : ''} ${text} `
+ return `${icon.length > 0 ? `` : ''} ${text} `
}
hexo.extend.tag.register('btn', btn, { ends: false })
diff --git a/source/css/_layout/mobile-sidebar.styl b/source/css/_layout/mobile-sidebar.styl
index 5d599fc..2b50b8f 100644
--- a/source/css/_layout/mobile-sidebar.styl
+++ b/source/css/_layout/mobile-sidebar.styl
@@ -12,7 +12,8 @@
top: 0
right: -250px
z-index: 103
- overflow: hidden scroll
+ overflow-x: hidden
+ overflow-y: auto
width: 250px
height: 100%
background: #f6f8fa