mirror of
https://github.com/ClovertaTheTrilobita/SanYeCao-blog.git
synced 2026-10-26 05:53:53 +00:00
Compare commits
No commits in common. "8ce67232e46bc920aba1794c368d4fdab0772a58" and "a40f7749ccd1cec9774b3129a38adeec65ddb2c6" have entirely different histories.
8ce67232e4
...
a40f7749cc
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