🐛 修復部分設備遇到mobile-sidebar無法滾動的bugs

🐛 修復BUTTON標籤嵌套使用在其他標籤時,生成多了br標籤而導致樣式不同的bugs
🐛 修復文章front-matter的highlight_shrink和toc為空時,會出現js報錯的bugs
This commit is contained in:
Jerry
2020-06-20 13:58:59 +08:00
Unverified
parent 4d9fca6ed6
commit baa6f72d35
4 changed files with 6 additions and 6 deletions

View File

@@ -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 )
-

View File

@@ -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"

View File

@@ -21,8 +21,7 @@ function btn (args) {
icon = icon.trim()
option = option.trim()
return `<a class="btn-beautify button--animated ${option}" href="${urlFor(url)}" title="${text}">
${icon.length > 0 ? `<i class="${icon} fa-fw"></i>` : ''} ${text} </a>`
return `<a class="btn-beautify button--animated ${option}" href="${urlFor(url)}" title="${text}">${icon.length > 0 ? `<i class="${icon} fa-fw"></i>` : ''} ${text} </a>`
}
hexo.extend.tag.register('btn', btn, { ends: false })

View File

@@ -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