mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-10 21:17:07 +08:00
breaking changes: 精簡各評論的配置
fix: 修復footer 在部分瀏覽器沒有顯示在底部的 bug improvement: 修改配置文件註釋
This commit is contained in:
23
_config.yml
23
_config.yml
@@ -281,12 +281,8 @@ disqus:
|
|||||||
# https://github.com/SukkaW/DisqusJS
|
# https://github.com/SukkaW/DisqusJS
|
||||||
disqusjs:
|
disqusjs:
|
||||||
shortname:
|
shortname:
|
||||||
siteName:
|
|
||||||
apikey:
|
apikey:
|
||||||
api:
|
option:
|
||||||
nocomment: # display when a blog post or an article has no comment attached
|
|
||||||
admin:
|
|
||||||
adminLabel:
|
|
||||||
|
|
||||||
# livere (來必力)
|
# livere (來必力)
|
||||||
# https://www.livere.com/
|
# https://www.livere.com/
|
||||||
@@ -301,11 +297,6 @@ gitalk:
|
|||||||
repo:
|
repo:
|
||||||
owner:
|
owner:
|
||||||
admin:
|
admin:
|
||||||
language: en # en, zh-CN, zh-TW, es-ES, fr, ru
|
|
||||||
perPage: 10 # Pagination size, with maximum 100.
|
|
||||||
distractionFreeMode: false # Facebook-like distraction free mode.
|
|
||||||
pagerDirection: last # Comment sorting direction, available values are last and first.
|
|
||||||
createIssueManually: false # Gitalk will create a corresponding github issue for your every single page automatically
|
|
||||||
option:
|
option:
|
||||||
|
|
||||||
# valine
|
# valine
|
||||||
@@ -313,17 +304,9 @@ gitalk:
|
|||||||
valine:
|
valine:
|
||||||
appId: # leancloud application app id
|
appId: # leancloud application app id
|
||||||
appKey: # leancloud application app key
|
appKey: # leancloud application app key
|
||||||
pageSize: 10 # comment list page size
|
|
||||||
avatar: monsterid # gravatar style https://valine.js.org/#/avatar
|
avatar: monsterid # gravatar style https://valine.js.org/#/avatar
|
||||||
lang: en # i18n: zh-CN/zh-TW/en/ja
|
|
||||||
placeholder: Please leave your footprints # valine comment input placeholder (like: Please leave your footprints)
|
|
||||||
guest_info: nick,mail,link # valine comment header info (nick/mail/link)
|
|
||||||
recordIP: false # Record reviewer IP
|
|
||||||
serverURLs: # This configuration is suitable for domestic custom domain name users, overseas version will be automatically detected (no need to manually fill in)
|
serverURLs: # This configuration is suitable for domestic custom domain name users, overseas version will be automatically detected (no need to manually fill in)
|
||||||
bg: # valine background
|
bg: # valine background
|
||||||
emojiCDN: # emoji CDN
|
|
||||||
enableQQ: false # enable the Nickname box to automatically get QQ Nickname and QQ Avatar
|
|
||||||
requiredFields: nick,mail # required fields (nick/mail)
|
|
||||||
visitor: false
|
visitor: false
|
||||||
option:
|
option:
|
||||||
|
|
||||||
@@ -461,9 +444,9 @@ google_adsense:
|
|||||||
# --------------------------------------
|
# --------------------------------------
|
||||||
|
|
||||||
site_verification:
|
site_verification:
|
||||||
# - name: google_site_verification
|
# - name: google-site-verification
|
||||||
# content: xxxxxx
|
# content: xxxxxx
|
||||||
# - name: baidu_site_verification
|
# - name: baidu-site-verification
|
||||||
# content: xxxxxxx
|
# content: xxxxxxx
|
||||||
|
|
||||||
# Beautify/Effect (美化/效果)
|
# Beautify/Effect (美化/效果)
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
- let disqusjsApi = theme.disqusjs.api || 'https://disqus.skk.moe/disqus/'
|
|
||||||
- let disqusjsPageTitle = page.title.replace(/'/ig,"\\'")
|
- let disqusjsPageTitle = page.title.replace(/'/ig,"\\'")
|
||||||
|
|
||||||
script.
|
script.
|
||||||
@@ -12,20 +11,16 @@ script.
|
|||||||
|
|
||||||
function initDisqusjs () {
|
function initDisqusjs () {
|
||||||
window.DISQUS = null
|
window.DISQUS = null
|
||||||
new DisqusJS({
|
new DisqusJS(Object.assign({
|
||||||
shortname: '!{theme.disqusjs.shortname}',
|
shortname: '!{theme.disqusjs.shortname}',
|
||||||
siteName: '!{theme.disqusjs.siteName}',
|
|
||||||
identifier: '!{ page.path }',
|
identifier: '!{ page.path }',
|
||||||
url: '!{ page.permalink }',
|
url: '!{ page.permalink }',
|
||||||
title: '!{ disqusjsPageTitle }',
|
title: '!{ disqusjsPageTitle }',
|
||||||
api: '!{disqusjsApi}',
|
|
||||||
apikey: '!{theme.disqusjs.apikey}',
|
apikey: '!{theme.disqusjs.apikey}',
|
||||||
nocomment: '!{theme.disqusjs.nocomment}',
|
},!{JSON.stringify(theme.disqusjs.option)}))
|
||||||
admin: '!{theme.disqusjs.admin}',
|
|
||||||
adminLabel: '!{theme.disqusjs.adminLabel}'
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
window.disqusReset = initDisqusjs
|
window.disqusReset = initDisqusjs
|
||||||
|
|
||||||
if (window.disqusJsLoad) initDisqusjs()
|
if (window.disqusJsLoad) initDisqusjs()
|
||||||
|
|||||||
@@ -15,11 +15,6 @@ script.
|
|||||||
owner: '!{theme.gitalk.owner}',
|
owner: '!{theme.gitalk.owner}',
|
||||||
admin: ['!{theme.gitalk.admin}'],
|
admin: ['!{theme.gitalk.admin}'],
|
||||||
id: '!{md5(page.path)}',
|
id: '!{md5(page.path)}',
|
||||||
language: '!{theme.gitalk.language}',
|
|
||||||
perPage: !{theme.gitalk.perPage},
|
|
||||||
distractionFreeMode: !{theme.gitalk.distractionFreeMode},
|
|
||||||
pagerDirection: '!{theme.gitalk.pagerDirection}',
|
|
||||||
createIssueManually: !{theme.gitalk.createIssueManually},
|
|
||||||
updateCountCallback: commentCount
|
updateCountCallback: commentCount
|
||||||
},!{JSON.stringify(theme.gitalk.option)}))
|
},!{JSON.stringify(theme.gitalk.option)}))
|
||||||
|
|
||||||
|
|||||||
@@ -9,18 +9,10 @@ script.
|
|||||||
el: '#vcomment',
|
el: '#vcomment',
|
||||||
appId: '#{theme.valine.appId}',
|
appId: '#{theme.valine.appId}',
|
||||||
appKey: '#{theme.valine.appKey}',
|
appKey: '#{theme.valine.appKey}',
|
||||||
placeholder: '#{theme.valine.placeholder}',
|
|
||||||
avatar: '#{theme.valine.avatar}',
|
avatar: '#{theme.valine.avatar}',
|
||||||
meta: '#{theme.valine.guest_info }'.split(','),
|
|
||||||
pageSize: '#{theme.valine.pageSize}',
|
|
||||||
lang: '#{theme.valine.lang}',
|
|
||||||
recordIP: #{theme.valine.recordIP},
|
|
||||||
serverURLs: '#{theme.valine.serverURLs}',
|
serverURLs: '#{theme.valine.serverURLs}',
|
||||||
emojiCDN: '#{theme.valine.emojiCDN}',
|
|
||||||
emojiMaps: !{emojiMaps},
|
emojiMaps: !{emojiMaps},
|
||||||
enableQQ: #{theme.valine.enableQQ},
|
|
||||||
path: window.location.pathname,
|
path: window.location.pathname,
|
||||||
requiredFields: [!{theme.valine.requiredFields ? JSON.stringify(theme.valine.requiredFields).split(',') : ''}],
|
|
||||||
visitor: #{theme.valine.visitor}
|
visitor: #{theme.valine.visitor}
|
||||||
}, !{JSON.stringify(theme.valine.option)}))
|
}, !{JSON.stringify(theme.valine.option)}))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hexo-theme-butterfly",
|
"name": "hexo-theme-butterfly",
|
||||||
"version": "3.8.1",
|
"version": "4.0.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": {
|
||||||
|
|||||||
@@ -27,8 +27,8 @@
|
|||||||
--blockquote-bg: $blockquote-background-color
|
--blockquote-bg: $blockquote-background-color
|
||||||
--reward-pop: $reward-pop-up-bg
|
--reward-pop: $reward-pop-up-bg
|
||||||
--toc-link-color: $toc-link-color
|
--toc-link-color: $toc-link-color
|
||||||
--card-box-shadow: 0 3px 8px 6px rgba(7, 17, 27, .06)
|
--card-box-shadow: 0 3px 8px 6px rgba(7, 17, 27, .05)
|
||||||
--card-hover-box-shadow: 0 3px 8px 6px rgba(7, 17, 27, .15)
|
--card-hover-box-shadow: 0 3px 8px 6px rgba(7, 17, 27, .09)
|
||||||
|
|
||||||
html
|
html
|
||||||
height: 100%
|
height: 100%
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
// index
|
// index
|
||||||
&.full_page
|
&.full_page
|
||||||
min-height: $index_top_img_height
|
height: $index_top_img_height
|
||||||
background-attachment: fixed
|
background-attachment: fixed
|
||||||
|
|
||||||
#site-info
|
#site-info
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
|
|
||||||
// page
|
// page
|
||||||
&.not-home-page
|
&.not-home-page
|
||||||
min-height: 20rem
|
height: 20rem
|
||||||
|
|
||||||
+maxWidth768()
|
+maxWidth768()
|
||||||
height: 14rem
|
height: 14rem
|
||||||
@@ -86,7 +86,7 @@
|
|||||||
|
|
||||||
// post
|
// post
|
||||||
&.post-bg
|
&.post-bg
|
||||||
min-height: 20rem
|
height: 20rem
|
||||||
|
|
||||||
+maxWidth768()
|
+maxWidth768()
|
||||||
height: 18rem
|
height: 18rem
|
||||||
@@ -118,7 +118,7 @@
|
|||||||
|
|
||||||
&.not-top-img
|
&.not-top-img
|
||||||
margin-bottom: .5rem
|
margin-bottom: .5rem
|
||||||
min-height: 60px
|
height: 60px
|
||||||
background: 0
|
background: 0
|
||||||
|
|
||||||
#nav
|
#nav
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#body-wrap
|
#body-wrap
|
||||||
display: flex
|
display: flex
|
||||||
flex-direction: column
|
flex-direction: column
|
||||||
height: 100vh
|
min-height: 100vh
|
||||||
|
|
||||||
.layout
|
.layout
|
||||||
display: flex
|
display: flex
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ $font-color = #1F2D3D
|
|||||||
$rem = 20px
|
$rem = 20px
|
||||||
$text-line-height = 2
|
$text-line-height = 2
|
||||||
$web-bg = hexo-config('background') && unquote(hexo-config('background'))
|
$web-bg = hexo-config('background') && unquote(hexo-config('background'))
|
||||||
$index_top_img_height = hexo-config('index_top_img_height') ? convert(hexo-config('index_top_img_height')) : 100%
|
$index_top_img_height = hexo-config('index_top_img_height') ? convert(hexo-config('index_top_img_height')) : 100vh
|
||||||
$index_site_info_top = hexo-config('index_site_info_top') ? convert(hexo-config('index_site_info_top')) : 43%
|
$index_site_info_top = hexo-config('index_site_info_top') ? convert(hexo-config('index_site_info_top')) : 43%
|
||||||
// Global color & SVG
|
// Global color & SVG
|
||||||
$light-blue = $theme-color
|
$light-blue = $theme-color
|
||||||
|
|||||||
Reference in New Issue
Block a user