diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 10fd0bb..4f260da 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -16,6 +16,16 @@ body: validations: required: true + - type: dropdown + id: modify + attributes: + label: 是否修改过主题文件? || Has the theme files been modified? + options: + - 是 (Yes) + - 不是 (No) + validations: + required: true + - type: dropdown id: browser attributes: diff --git a/layout/includes/head/config.pug b/layout/includes/head/config.pug index 4bcff8f..5a8b8f5 100644 --- a/layout/includes/head/config.pug +++ b/layout/includes/head/config.pug @@ -120,5 +120,5 @@ script. }, isPhotoFigcaption: !{theme.photofigcaption}, islazyload: !{theme.lazyload.enable}, - isAnchor: !{theme.anchor.auto_update} + isAnchor: !{theme.anchor.auto_update || false} } diff --git a/layout/includes/third-party/math/mathjax.pug b/layout/includes/third-party/math/mathjax.pug index 688e6dc..229d472 100644 --- a/layout/includes/third-party/math/mathjax.pug +++ b/layout/includes/third-party/math/mathjax.pug @@ -7,7 +7,7 @@ script. tags: 'ams' }, chtml: { - scale: 1.2 + scale: 1.1 }, options: { renderActions: { @@ -23,12 +23,11 @@ script. } }, ''], insertScript: [200, () => { - document.querySelectorAll('mjx-container:not\([display]\)').forEach(node => { - const target = node.parentNode - if (target.nodeName.toLowerCase() === 'li') { - target.parentNode.classList.add('has-jax') + document.querySelectorAll('mjx-container').forEach(node => { + if (node.hasAttribute('display')) { + btf.wrap(node, 'div', { class: 'mathjax-overflow' }) } else { - target.classList.add('has-jax') + btf.wrap(node, 'span', { class: 'mathjax-overflow' }) } }); }, '', false] diff --git a/package.json b/package.json index bc1c701..38882af 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hexo-theme-butterfly", - "version": "4.5.0", + "version": "4.5.1", "description": "A Simple and Card UI Design theme for Hexo", "main": "package.json", "scripts": { diff --git a/plugins.yml b/plugins.yml index 537d9e7..9590b68 100644 --- a/plugins.yml +++ b/plugins.yml @@ -5,7 +5,7 @@ algolia_search_v4: instantsearch_v4: name: instantsearch.js file: dist/instantsearch.production.min.js - version: 4.48.1 + version: 4.49.0 pjax: name: pjax file: pjax.min.js @@ -64,12 +64,12 @@ katex: name: katex file: dist/katex.min.css other_name: KaTeX - version: 0.16.2 + version: 0.16.3 katex_copytex: name: katex file: dist/contrib/copy-tex.min.js other_name: KaTeX - version: 0.16.2 + version: 0.16.3 mermaid: name: mermaid file: dist/mermaid.min.js @@ -183,11 +183,11 @@ prismjs_autoloader: artalk_js: name: artalk file: dist/Artalk.js - version: 2.4.2 + version: 2.4.3 artalk_css: name: artalk file: dist/Artalk.css - version: 2.4.2 + version: 2.4.3 pace_js: name: pace-js other_name: pace diff --git a/source/css/_layout/third-party.styl b/source/css/_layout/third-party.styl index a90fa5d..bc2bd51 100644 --- a/source/css/_layout/third-party.styl +++ b/source/css/_layout/third-party.styl @@ -81,12 +81,16 @@ if hexo-config('waline.bg') &::-webkit-scrollbar display: none -// mathjax -mjx-container[display], -.has-jax +// Mathjax +.mathjax-overflow overflow-x: auto overflow-y: hidden - line-height: normal !important + +span.mathjax-overflow + display: inline-block + padding: 0 2px + max-width: 100% + vertical-align: bottom .aplayer color: $font-black