mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2025-09-15 12:58:48 +08:00
fix: 修復 inline mathjax 有滾動條的 bug
This commit is contained in:
parent
3f796adc88
commit
eca1487a5e
12
layout/includes/third-party/math/mathjax.pug
vendored
12
layout/includes/third-party/math/mathjax.pug
vendored
@ -21,7 +21,17 @@ script.
|
|||||||
math.end = {node: text, delim: '', n: 0}
|
math.end = {node: text, delim: '', n: 0}
|
||||||
doc.math.push(math)
|
doc.math.push(math)
|
||||||
}
|
}
|
||||||
}, '']
|
}, ''],
|
||||||
|
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')
|
||||||
|
} else {
|
||||||
|
target.classList.add('has-jax')
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}, '', false]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hexo-theme-butterfly",
|
"name": "hexo-theme-butterfly",
|
||||||
"version": "3.8.0",
|
"version": "3.8.1-b1",
|
||||||
"description": "A Simple and Card UI Design theme for Hexo",
|
"description": "A Simple and Card UI Design theme for Hexo",
|
||||||
"main": "package.json",
|
"main": "package.json",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@ -90,14 +90,11 @@ if hexo-config('waline.bg')
|
|||||||
display: none
|
display: none
|
||||||
|
|
||||||
// mathjax
|
// mathjax
|
||||||
mjx-container
|
mjx-container[display],
|
||||||
|
.has-jax
|
||||||
overflow-x: auto
|
overflow-x: auto
|
||||||
overflow-y: hidden
|
overflow-y: hidden
|
||||||
|
|
||||||
&:not([display])
|
|
||||||
display: inline-grid
|
|
||||||
max-width: 100%
|
|
||||||
|
|
||||||
.aplayer
|
.aplayer
|
||||||
color: $font-black
|
color: $font-black
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user