From 7923a15e17b636f387baa9ccd1570127346e476f Mon Sep 17 00:00:00 2001 From: Jerry Date: Mon, 9 Oct 2023 19:54:18 +0800 Subject: [PATCH] 4.10 --- _config.yml | 8 ++++-- layout/includes/third-party/effect.pug | 12 ++++----- package.json | 2 +- plugins.yml | 34 +++++++++++++------------- source/css/_layout/aside.styl | 1 + source/css/_layout/post.styl | 4 ++- source/css/_tags/note.styl | 3 +++ source/js/main.js | 2 -- 8 files changed, 37 insertions(+), 29 deletions(-) diff --git a/_config.yml b/_config.yml index 67657f8..96cfa5a 100644 --- a/_config.yml +++ b/_config.yml @@ -163,6 +163,7 @@ post_copyright: # Sponsor/reward reward: enable: false + text: QR_code: # - img: /img/wechat.jpg # link: @@ -634,6 +635,9 @@ index_top_img_height: category_ui: # 留空或 index tag_ui: # 留空或 index +# Stretches the lines so that each line has equal width(文字向兩側對齊,對最後一行無效) +text_align_justify: false + # Website Background (設置網站背景) # can set it to color or image (可設置圖片 或者 顔色) # The formal of image: url(http://xxxxxx.com/xxx.jpg) @@ -701,7 +705,7 @@ click_heart: mobile: false # Mouse click effects: words (鼠標點擊效果: 文字) -ClickShowText: +clickShowText: enable: false text: # - I @@ -946,7 +950,7 @@ CDN: # canvas_nest: # canvas_ribbon: # click_heart: - # ClickShowText: + # clickShowText: # disqusjs: # disqusjs_css: # docsearch_css: diff --git a/layout/includes/third-party/effect.pug b/layout/includes/third-party/effect.pug index 275297c..a3b2995 100644 --- a/layout/includes/third-party/effect.pug +++ b/layout/includes/third-party/effect.pug @@ -24,12 +24,12 @@ if theme.activate_power_mode.enable if theme.click_heart && theme.click_heart.enable script#click-heart(src=url_for(theme.asset.click_heart) async mobile=`${theme.click_heart.mobile}`) -if theme.ClickShowText && theme.ClickShowText.enable +if theme.clickShowText && theme.clickShowText.enable script#click-show-text( - src= url_for(theme.asset.ClickShowText) - data-mobile= `${theme.ClickShowText.mobile}` - data-text= theme.ClickShowText.text.join(",") - data-fontsize= theme.ClickShowText.fontSize - data-random= `${theme.ClickShowText.random}` + src= url_for(theme.asset.clickShowText) + data-mobile= `${theme.clickShowText.mobile}` + data-text= theme.clickShowText.text.join(",") + data-fontsize= theme.clickShowText.fontSize + data-random= `${theme.clickShowText.random}` async ) \ No newline at end of file diff --git a/package.json b/package.json index 9daa55f..0ed17d4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hexo-theme-butterfly", - "version": "4.10.0-b3", + "version": "4.10.0", "description": "A Simple and Card UI Design theme for Hexo", "main": "package.json", "scripts": { diff --git a/plugins.yml b/plugins.yml index ce67425..b25c304 100644 --- a/plugins.yml +++ b/plugins.yml @@ -1,11 +1,11 @@ algolia_search: name: algoliasearch file: dist/algoliasearch-lite.umd.js - version: 4.18.0 + version: 4.20.0 instantsearch: name: instantsearch.js file: dist/instantsearch.production.min.js - version: 4.56.5 + version: 4.57.0 pjax: name: pjax file: pjax.min.js @@ -37,17 +37,17 @@ disqusjs_css: twikoo: name: twikoo file: dist/twikoo.all.min.js - version: 1.6.16 + version: 1.6.22 waline_js: name: '@waline/client' file: dist/waline.js other_name: waline - version: 2.15.5 + version: 2.15.8 waline_css: name: '@waline/client' file: dist/waline.css other_name: waline - version: 2.15.5 + version: 2.15.8 sharejs: name: butterfly-extsrc file: sharejs/dist/js/social-share.min.js @@ -64,16 +64,16 @@ katex: name: katex file: dist/katex.min.css other_name: KaTeX - version: 0.16.8 + version: 0.16.9 katex_copytex: name: katex file: dist/contrib/copy-tex.min.js other_name: KaTeX - version: 0.16.8 + version: 0.16.9 mermaid: name: mermaid file: dist/mermaid.min.js - version: 10.2.4 + version: 10.5.0 canvas_ribbon: name: butterfly-extsrc file: dist/canvas-ribbon.min.js @@ -98,7 +98,7 @@ click_heart: name: butterfly-extsrc file: dist/click-heart.min.js version: 1.1.3 -ClickShowText: +clickShowText: name: butterfly-extsrc file: dist/click-show-text.min.js version: 1.1.3 @@ -121,12 +121,12 @@ pangu: fancybox_css: name: '@fancyapps/ui' file: dist/fancybox/fancybox.css - version: 5.0.20 + version: 5.0.24 other_name: fancyapps-ui fancybox: name: '@fancyapps/ui' file: dist/fancybox/fancybox.umd.js - version: 5.0.20 + version: 5.0.24 other_name: fancyapps-ui medium_zoom: name: medium-zoom @@ -144,12 +144,12 @@ fontawesome: name: '@fortawesome/fontawesome-free' file: css/all.min.css other_name: font-awesome - version: 6.4.0 + version: 6.4.2 egjs_infinitegrid: name: '@egjs/infinitegrid' other_name: egjs-infinitegrid file: dist/infinitegrid.min.js - version: 4.10.0 + version: 4.10.1 aplayer_css: name: aplayer file: dist/APlayer.min.css @@ -180,11 +180,11 @@ prismjs_autoloader: artalk_js: name: artalk file: dist/Artalk.js - version: 2.5.5 + version: 2.6.3 artalk_css: name: artalk file: dist/Artalk.css - version: 2.5.5 + version: 2.6.3 pace_js: name: pace-js other_name: pace @@ -199,12 +199,12 @@ docsearch_js: name: '@docsearch/js' other_name: docsearch-js file: dist/umd/index.js - version: 3.5.1 + version: 3.5.2 docsearch_css: name: '@docsearch/css' other_name: docsearch-css file: dist/style.css - version: 3.5.1 + version: 3.5.2 abcjs_basic_js: name: abcjs file: dist/abcjs-basic-min.js diff --git a/source/css/_layout/aside.styl b/source/css/_layout/aside.styl index 77481de..f9c1bae 100644 --- a/source/css/_layout/aside.styl +++ b/source/css/_layout/aside.styl @@ -232,6 +232,7 @@ width: $toc-mobile-width transition: none transform: scale(0) + transform-origin: right bottom &.open transform: scale(1) diff --git a/source/css/_layout/post.styl b/source/css/_layout/post.styl index 5ad98ba..6ad1efc 100644 --- a/source/css/_layout/post.styl +++ b/source/css/_layout/post.styl @@ -72,7 +72,9 @@ beautify() #article-container word-wrap: break-word overflow-wrap: break-word - text-align: justify + + if hexo-config('text_align_justify') + text-align: justify a color: $theme-link-color diff --git a/source/css/_tags/note.styl b/source/css/_tags/note.styl index efd3781..041603f 100644 --- a/source/css/_tags/note.styl +++ b/source/css/_tags/note.styl @@ -73,6 +73,9 @@ &:last-child margin-bottom: 0 !important + .img-alt + margin: 5px 0 10px + if $note-icons &:not(.no-icon) padding-left: 3em diff --git a/source/js/main.js b/source/js/main.js index 9d5ebd7..a22b57f 100644 --- a/source/js/main.js +++ b/source/js/main.js @@ -595,12 +595,10 @@ document.addEventListener('DOMContentLoaded', function () { }, 'mobile-toc-button': item => { // Show mobile toc const tocEle = document.getElementById('card-toc') - tocEle.style.transformOrigin = `right ${item.getBoundingClientRect().top + 17}px` tocEle.style.transition = 'transform 0.3s ease-in-out' tocEle.classList.toggle('open') tocEle.addEventListener('transitionend', () => { tocEle.style.transition = '' - tocEle.style.transformOrigin = '' }, { once: true }) }, 'chat-btn': () => { // Show chat