From 43790dec07ea34e0fe90f3d854b6c9b020e64d34 Mon Sep 17 00:00:00 2001 From: Jerry Date: Tue, 20 Jul 2021 23:56:40 +0800 Subject: [PATCH] =?UTF-8?q?breaking=20changes:=20=E7=B2=BE=E7=B0=A1?= =?UTF-8?q?=E5=90=84=E8=A9=95=E8=AB=96=E7=9A=84=E9=85=8D=E7=BD=AE=20fix:?= =?UTF-8?q?=20=E4=BF=AE=E5=BE=A9footer=20=E5=9C=A8=E9=83=A8=E5=88=86?= =?UTF-8?q?=E7=80=8F=E8=A6=BD=E5=99=A8=E6=B2=92=E6=9C=89=E9=A1=AF=E7=A4=BA?= =?UTF-8?q?=E5=9C=A8=E5=BA=95=E9=83=A8=E7=9A=84=20bug=20improvement:=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E8=A8=BB?= =?UTF-8?q?=E9=87=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _config.yml | 23 +++---------------- .../third-party/comments/disqusjs.pug | 11 +++------ .../includes/third-party/comments/gitalk.pug | 5 ---- .../includes/third-party/comments/valine.pug | 8 ------- package.json | 2 +- source/css/_global/index.styl | 4 ++-- source/css/_layout/head.styl | 8 +++---- source/css/_page/common.styl | 2 +- source/css/var.styl | 2 +- 9 files changed, 15 insertions(+), 50 deletions(-) diff --git a/_config.yml b/_config.yml index fa6cadb..a098555 100644 --- a/_config.yml +++ b/_config.yml @@ -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 (美化/效果) diff --git a/layout/includes/third-party/comments/disqusjs.pug b/layout/includes/third-party/comments/disqusjs.pug index e88849a..268c16f 100644 --- a/layout/includes/third-party/comments/disqusjs.pug +++ b/layout/includes/third-party/comments/disqusjs.pug @@ -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() diff --git a/layout/includes/third-party/comments/gitalk.pug b/layout/includes/third-party/comments/gitalk.pug index 8e78386..06ecfd9 100644 --- a/layout/includes/third-party/comments/gitalk.pug +++ b/layout/includes/third-party/comments/gitalk.pug @@ -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)})) diff --git a/layout/includes/third-party/comments/valine.pug b/layout/includes/third-party/comments/valine.pug index d5121bc..91b3110 100644 --- a/layout/includes/third-party/comments/valine.pug +++ b/layout/includes/third-party/comments/valine.pug @@ -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)})) } diff --git a/package.json b/package.json index 4a9118b..c8b5a00 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/source/css/_global/index.styl b/source/css/_global/index.styl index 0586671..8edc7f8 100644 --- a/source/css/_global/index.styl +++ b/source/css/_global/index.styl @@ -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% diff --git a/source/css/_layout/head.styl b/source/css/_layout/head.styl index cefba44..bcd740a 100644 --- a/source/css/_layout/head.styl +++ b/source/css/_layout/head.styl @@ -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 diff --git a/source/css/_page/common.styl b/source/css/_page/common.styl index 4076804..c695216 100644 --- a/source/css/_page/common.styl +++ b/source/css/_page/common.styl @@ -1,7 +1,7 @@ #body-wrap display: flex flex-direction: column - height: 100vh + min-height: 100vh .layout display: flex diff --git a/source/css/var.styl b/source/css/var.styl index 6205406..87e1503 100644 --- a/source/css/var.styl +++ b/source/css/var.styl @@ -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