This commit is contained in:
tangly1024
2023-06-23 10:04:37 +08:00
parent f6fea6a6c1
commit e47ddfb593
3 changed files with 6 additions and 20 deletions

View File

@@ -92,22 +92,4 @@ const mapPageUrl = id => {
return '/' + id.replace(/-/g, '')
}
// function getMediumZoomMargin() {
// const width = window.innerWidth
// if (width < 500) {
// return 8
// } else if (width < 800) {
// return 20
// } else if (width < 1280) {
// return 30
// } else if (width < 1600) {
// return 40
// } else if (width < 1920) {
// return 48
// } else {
// return 72
// }
// }
export default NotionPage

View File

@@ -32,7 +32,9 @@ const PrismMac = () => {
renderPrismMac()
})
}
renderMermaid()
setTimeout(() => {
renderMermaid()
}, 500)
}, [])
return <></>
}

View File

@@ -109,7 +109,9 @@ const initTheme = () => {
elements[elements.length - 1].scrollIntoView()
// 删除前面的元素,只保留最后一个元素
elements[0].parentNode.removeChild(elements[0])
elements.pop()
if (Object.prototype.hasOwnProperty.call(elements, 'pop')) {
elements.pop()
}
}
}, 500)
}