This commit is contained in:
Jerry
2023-06-06 23:32:36 +08:00
Unverified
parent 28d1744b9b
commit 5d52302a38
43 changed files with 431 additions and 387 deletions

View File

@@ -186,10 +186,9 @@ const btf = {
},
unwrap: el => {
const elParentNode = el.parentNode
if (elParentNode !== document.body) {
elParentNode.parentNode.insertBefore(el, elParentNode)
elParentNode.parentNode.removeChild(elParentNode)
const parent = el.parentNode
if (parent && parent !== document.body) {
parent.replaceChild(el, parent)
}
},
@@ -211,13 +210,7 @@ const btf = {
const service = GLOBAL_CONFIG.lightbox
if (service === 'mediumZoom') {
const zoom = mediumZoom(ele)
zoom.on('open', e => {
const photoBg = document.documentElement.getAttribute('data-theme') === 'dark' ? '#121212' : '#fff'
zoom.update({
background: photoBg
})
})
mediumZoom(ele, { background: 'var(--zoom-bg)' })
}
if (service === 'fancybox') {