perf: optimize katex config, implement async css loading for katex, improve scrollbar and lightbox loading logic

This commit is contained in:
radishzzz 2025-05-08 18:13:15 +01:00
parent 625879b061
commit 979f36a796
6 changed files with 66 additions and 60 deletions

View file

@ -60,18 +60,6 @@ function initBackToTop() {
})
}
function cleanup() {
// Cleanup observer
if (observer) {
observer.disconnect()
observer = null
}
// Remove event listeners
backToTopButton = null
}
// Handle page transitions
document.addEventListener('astro:page-load', initBackToTop)
document.addEventListener('astro:before-swap', cleanup)
</script>