* chore: bump theme version to 5.5.5 and update third-party plugins

* fix: recognize 404 in page type helper
* style: adjust pagination items margin
* feat: use ResizeObserver to update header positions for dynamic article heights
This commit is contained in:
myw
2026-06-11 00:28:28 +08:00 Unverified
parent 13315f6710
commit f4a6f79142
5 changed files with 26 additions and 19 deletions
+8 -1
View File
@@ -567,7 +567,14 @@ document.addEventListener('DOMContentLoaded', () => {
}
updateHeaderPositions()
btf.addEventListenerPjax(window, 'resize', btf.throttle(updateHeaderPositions, 200))
const throttledUpdate = btf.throttle(updateHeaderPositions, 200)
btf.addEventListenerPjax(window, 'resize', throttledUpdate)
if ('ResizeObserver' in window) {
const observer = new ResizeObserver(throttledUpdate)
observer.observe($article)
btf.addGlobalFn('pjaxSendOnce', () => { observer.disconnect() })
}
const findHeadPosition = top => {
if (top === 0) return false