feat: 增加配置 disable_top_img,禁用所有的top_img

fix: 修復 background-image 遇到連結有括號時會無法顯示的bug
fix: Readmode 標題邊距
fix: 修復twikoo 評論數獲取會因為地域問題報錯的bug
This commit is contained in:
Jerry
2021-01-03 00:04:09 +08:00
Unverified
parent c373b64cfb
commit 81fc48df40
6 changed files with 12 additions and 7 deletions

View File

@@ -86,6 +86,9 @@ avatar:
img: img:
effect: false effect: false
# Disable all banner image
disable_top_img: false
# The banner image of home page # The banner image of home page
index_img: index_img:

View File

@@ -1,4 +1,4 @@
if page.top_img !== false if !theme.disable_top_img && page.top_img !== false
if is_post() if is_post()
- var top_img = page.top_img || page.cover || page.randomcover || theme.default_top_img - var top_img = page.top_img || page.cover || page.randomcover || theme.default_top_img
else if is_page() else if is_page()

View File

@@ -21,6 +21,7 @@ script.
const getCount = () => { const getCount = () => {
twikoo.getCommentsCount({ twikoo.getCommentsCount({
envId: '!{theme.twikoo.envId}', envId: '!{theme.twikoo.envId}',
region: '!{theme.twikoo.region}',
urls: [window.location.pathname], urls: [window.location.pathname],
includeReply: false includeReply: false
}).then(function (res) { }).then(function (res) {

View File

@@ -1,6 +1,6 @@
{ {
"name": "hexo-theme-butterfly", "name": "hexo-theme-butterfly",
"version": "3.5.1", "version": "3.6.0-b1",
"description": "A Simple and Card UI Design theme for Hexo", "description": "A Simple and Card UI Design theme for Hexo",
"main": "package.json", "main": "package.json",
"scripts": { "scripts": {

View File

@@ -10,10 +10,6 @@
&:hover &:hover
background: var(--btn-hover-color) background: var(--btn-hover-color)
textarea
&:focus
background-image: none
.vimg .vimg
transition: all .3s transition: all .3s
@@ -30,11 +26,17 @@ if hexo-config('valine.bg')
textarea textarea
background: url(hexo-config('valine.bg')) 100% 100% no-repeat background: url(hexo-config('valine.bg')) 100% 100% no-repeat
&:focus
background-image: none
if hexo-config('waline.bg') if hexo-config('waline.bg')
#waline-wrap #waline-wrap
textarea textarea
background: url(hexo-config('waline.bg')) 100% 100% no-repeat background: url(hexo-config('waline.bg')) 100% 100% no-repeat
&:focus
background-image: none
.fireworks .fireworks
position: fixed position: fixed
top: 0 top: 0

View File

@@ -60,7 +60,6 @@ if hexo-config('readmode')
opacity: 0 opacity: 0
& > #post-info & > #post-info
padding: 0
text-align: center text-align: center
#post #post