diff --git a/layout/includes/third-party/subtitle.pug b/layout/includes/third-party/subtitle.pug index 8dbb534..4e04e54 100644 --- a/layout/includes/third-party/subtitle.pug +++ b/layout/includes/third-party/subtitle.pug @@ -1,5 +1,5 @@ - const { effect, source, sub, typed_option } = theme.subtitle -- let subContent = sub || new Array() +- let subContent = typeof sub === 'string' ? [sub] : (sub || new Array()) script. window.typedJSFn = { diff --git a/package.json b/package.json index ad45920..f6b86eb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hexo-theme-butterfly", - "version": "5.5.4", + "version": "5.5.5", "description": "A Simple and Card UI Design theme for Hexo", "main": "package.json", "scripts": { @@ -26,7 +26,7 @@ "hexo-renderer-pug": "^3.0.0", "hexo-renderer-stylus": "^3.0.1", "hexo-util": "^4.0.0", - "moment-timezone": "^0.6.0" + "moment-timezone": "^0.6.2" }, "homepage": "https://butterfly.js.org/", "author": "Jerry ", diff --git a/plugins.yml b/plugins.yml index 4eb9381..ee0f167 100644 --- a/plugins.yml +++ b/plugins.yml @@ -1,7 +1,7 @@ abcjs_basic_js: name: abcjs file: dist/abcjs-basic-min.js - version: 6.6.0 + version: 6.6.3 activate_power_mode: name: butterfly-extsrc file: dist/activate-power-mode.min.js @@ -9,7 +9,7 @@ activate_power_mode: algolia_search: name: algoliasearch file: dist/lite/builds/browser.umd.js - version: 5.47.0 + version: 5.53.0 aplayer_css: name: aplayer file: dist/APlayer.min.css @@ -66,12 +66,12 @@ docsearch_css: name: '@docsearch/css' other_name: docsearch-css file: dist/style.css - version: 4.5.3 + version: 4.6.3 docsearch_js: name: '@docsearch/js' other_name: docsearch-js file: dist/umd/index.js - version: 4.5.3 + version: 4.6.3 egjs_infinitegrid: name: '@egjs/infinitegrid' other_name: egjs-infinitegrid @@ -80,12 +80,12 @@ egjs_infinitegrid: fancybox: name: '@fancyapps/ui' file: dist/fancybox/fancybox.umd.js - version: 6.1.9 + version: 6.1.14 other_name: fancyapps-ui fancybox_css: name: '@fancyapps/ui' file: dist/fancybox/fancybox.css - version: 6.1.9 + version: 6.1.14 other_name: fancyapps-ui fireworks: name: butterfly-extsrc @@ -95,7 +95,7 @@ fontawesome: name: '@fortawesome/fontawesome-free' file: css/all.min.css other_name: font-awesome - version: 7.1.0 + version: 7.2.0 gitalk: name: gitalk file: dist/gitalk.min.js @@ -112,12 +112,12 @@ katex: name: katex file: dist/katex.min.css other_name: KaTeX - version: 0.16.28 + version: 0.17.0 katex_copytex: name: katex file: dist/contrib/copy-tex.min.js other_name: KaTeX - version: 0.16.28 + version: 0.17.0 lazyload: name: vanilla-lazyload file: dist/lazyload.iife.min.js @@ -125,7 +125,7 @@ lazyload: mathjax: name: mathjax file: tex-mml-chtml.js - version: 4.1.0 + version: 4.1.2 medium_zoom: name: medium-zoom file: dist/medium-zoom.min.js @@ -133,7 +133,7 @@ medium_zoom: mermaid: name: mermaid file: dist/mermaid.min.js - version: 11.12.2 + version: 11.15.0 meting_js: name: butterfly-extsrc file: metingjs/dist/Meting.min.js @@ -186,7 +186,7 @@ snackbar_css: twikoo: name: twikoo file: dist/twikoo.all.min.js - version: 1.6.44 + version: 1.7.11 typed: name: typed.js file: dist/typed.umd.js @@ -199,9 +199,9 @@ waline_css: name: '@waline/client' file: dist/waline.css other_name: waline - version: 3.8.0 + version: 3.15.2 waline_js: name: '@waline/client' file: dist/waline.js other_name: waline - version: 3.8.0 + version: 3.15.2 diff --git a/scripts/helpers/page.js b/scripts/helpers/page.js index 01fbcc0..45d4b35 100644 --- a/scripts/helpers/page.js +++ b/scripts/helpers/page.js @@ -171,7 +171,7 @@ hexo.extend.helper.register('getPageType', (page, isHome) => { if (category) return 'category' if (archive) return 'archive' if (type) { - if (type === 'tags' || type === 'categories') return type + if (type === 'tags' || type === 'categories' || type === '404') return type else return 'page' } if (isHome) return 'home' diff --git a/source/css/_layout/pagination.styl b/source/css/_layout/pagination.styl index d05cb25..e16ec81 100644 --- a/source/css/_layout/pagination.styl +++ b/source/css/_layout/pagination.styl @@ -39,7 +39,7 @@ .pagination & > * display: inline-block - margin: 0 6px + margin: 6px width: w = 2.5em height: w line-height: w diff --git a/source/css/_layout/third-party.styl b/source/css/_layout/third-party.styl index 8e85e6c..54ab8c7 100644 --- a/source/css/_layout/third-party.styl +++ b/source/css/_layout/third-party.styl @@ -226,5 +226,6 @@ if hexo-config('math.use') opacity: 1 +maxWidth768() - .fancybox__toolbar__column.is-middle - display: none + .fancybox__toolbar__column.is-middle, + .f-carousel__toolbar__column.is-middle + visibility: hidden diff --git a/source/js/main.js b/source/js/main.js index 0aab1d5..ac2112e 100644 --- a/source/js/main.js +++ b/source/js/main.js @@ -567,7 +567,14 @@ document.addEventListener('DOMContentLoaded', () => { } updateHeaderPositions() - btf.addEventListenerPjax(window, 'resize', btf.throttle(updateHeaderPositions, 200)) + const throttledUpdate = btf.throttle(updateHeaderPositions, 200) + btf.addEventListenerPjax(window, 'resize', throttledUpdate) + + if ('ResizeObserver' in window) { + const observer = new ResizeObserver(throttledUpdate) + observer.observe($article) + btf.addGlobalFn('pjaxSendOnce', () => { observer.disconnect() }) + } const findHeadPosition = top => { if (top === 0) return false