breaking changes: 精簡各評論的配置

fix: 修復footer 在部分瀏覽器沒有顯示在底部的 bug
improvement: 修改配置文件註釋
This commit is contained in:
Jerry 2021-07-20 23:56:40 +08:00
parent bbb9beb8f9
commit 43790dec07
9 changed files with 15 additions and 50 deletions

View File

@ -281,12 +281,8 @@ disqus:
# https://github.com/SukkaW/DisqusJS
disqusjs:
shortname:
siteName:
apikey:
api:
nocomment: # display when a blog post or an article has no comment attached
admin:
adminLabel:
option:
# livere (來必力)
# https://www.livere.com/
@ -301,11 +297,6 @@ gitalk:
repo:
owner:
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:
# valine
@ -313,17 +304,9 @@ gitalk:
valine:
appId: # leancloud application app id
appKey: # leancloud application app key
pageSize: 10 # comment list page size
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)
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
option:
@ -461,9 +444,9 @@ google_adsense:
# --------------------------------------
site_verification:
# - name: google_site_verification
# - name: google-site-verification
# content: xxxxxx
# - name: baidu_site_verification
# - name: baidu-site-verification
# content: xxxxxxx
# Beautify/Effect (美化/效果)

View File

@ -1,4 +1,3 @@
- let disqusjsApi = theme.disqusjs.api || 'https://disqus.skk.moe/disqus/'
- let disqusjsPageTitle = page.title.replace(/'/ig,"\\'")
script.
@ -12,20 +11,16 @@ script.
function initDisqusjs () {
window.DISQUS = null
new DisqusJS({
new DisqusJS(Object.assign({
shortname: '!{theme.disqusjs.shortname}',
siteName: '!{theme.disqusjs.siteName}',
identifier: '!{ page.path }',
url: '!{ page.permalink }',
title: '!{ disqusjsPageTitle }',
api: '!{disqusjsApi}',
apikey: '!{theme.disqusjs.apikey}',
nocomment: '!{theme.disqusjs.nocomment}',
admin: '!{theme.disqusjs.admin}',
adminLabel: '!{theme.disqusjs.adminLabel}'
});
},!{JSON.stringify(theme.disqusjs.option)}))
}
window.disqusReset = initDisqusjs
if (window.disqusJsLoad) initDisqusjs()

View File

@ -15,11 +15,6 @@ script.
owner: '!{theme.gitalk.owner}',
admin: ['!{theme.gitalk.admin}'],
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
},!{JSON.stringify(theme.gitalk.option)}))

View File

@ -9,18 +9,10 @@ script.
el: '#vcomment',
appId: '#{theme.valine.appId}',
appKey: '#{theme.valine.appKey}',
placeholder: '#{theme.valine.placeholder}',
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}',
emojiCDN: '#{theme.valine.emojiCDN}',
emojiMaps: !{emojiMaps},
enableQQ: #{theme.valine.enableQQ},
path: window.location.pathname,
requiredFields: [!{theme.valine.requiredFields ? JSON.stringify(theme.valine.requiredFields).split(',') : ''}],
visitor: #{theme.valine.visitor}
}, !{JSON.stringify(theme.valine.option)}))
}

View File

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

View File

@ -27,8 +27,8 @@
--blockquote-bg: $blockquote-background-color
--reward-pop: $reward-pop-up-bg
--toc-link-color: $toc-link-color
--card-box-shadow: 0 3px 8px 6px rgba(7, 17, 27, .06)
--card-hover-box-shadow: 0 3px 8px 6px rgba(7, 17, 27, .15)
--card-box-shadow: 0 3px 8px 6px rgba(7, 17, 27, .05)
--card-hover-box-shadow: 0 3px 8px 6px rgba(7, 17, 27, .09)
html
height: 100%

View File

@ -9,7 +9,7 @@
// index
&.full_page
min-height: $index_top_img_height
height: $index_top_img_height
background-attachment: fixed
#site-info
@ -70,7 +70,7 @@
// page
&.not-home-page
min-height: 20rem
height: 20rem
+maxWidth768()
height: 14rem
@ -86,7 +86,7 @@
// post
&.post-bg
min-height: 20rem
height: 20rem
+maxWidth768()
height: 18rem
@ -118,7 +118,7 @@
&.not-top-img
margin-bottom: .5rem
min-height: 60px
height: 60px
background: 0
#nav

View File

@ -1,7 +1,7 @@
#body-wrap
display: flex
flex-direction: column
height: 100vh
min-height: 100vh
.layout
display: flex

View File

@ -33,7 +33,7 @@ $font-color = #1F2D3D
$rem = 20px
$text-line-height = 2
$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%
// Global color & SVG
$light-blue = $theme-color