mirror of
https://github.com/ClovertaTheTrilobita/SanYeCao-blog.git
synced 2026-10-26 05:53:53 +00:00
Compare commits
No commits in common. "630ddf403d41d5ad9a35b1715c464844ec92e7ee" and "bc431280dd1175d70fda78c66b7e342aaed62904" have entirely different histories.
630ddf403d
...
bc431280dd
1 changed files with 0 additions and 6 deletions
|
|
@ -186,12 +186,6 @@ const publishedDate = new Intl.DateTimeFormat(
|
||||||
const content = document.querySelector<HTMLElement>(".post-content");
|
const content = document.querySelector<HTMLElement>(".post-content");
|
||||||
if (!bar || !content) return;
|
if (!bar || !content) return;
|
||||||
|
|
||||||
// Keep the fixed progress bar outside Astro's animated page container.
|
|
||||||
// Otherwise the header's transformed compositor layer can paint above it.
|
|
||||||
if (bar.parentElement !== document.body) {
|
|
||||||
document.body.appendChild(bar);
|
|
||||||
}
|
|
||||||
|
|
||||||
const updateProgress = () => {
|
const updateProgress = () => {
|
||||||
const contentTop = content.getBoundingClientRect().top + window.scrollY;
|
const contentTop = content.getBoundingClientRect().top + window.scrollY;
|
||||||
const readableDistance = Math.max(
|
const readableDistance = Math.max(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue