fixed toc progressbar

This commit is contained in:
2026-04-29 23:23:31 +02:00
parent 8ec3992945
commit 3bcf9f47fb
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -216,7 +216,7 @@ document.addEventListener('DOMContentLoaded', function () {
} }
var rect = article.getBoundingClientRect(); var rect = article.getBoundingClientRect();
var total = Math.max(article.offsetHeight - window.innerHeight, 1); var total = Math.max(article.scrollHeight - window.innerHeight, 1);
var progress = Math.min( var progress = Math.min(
Math.max((-rect.top / total) * 100, 0), Math.max((-rect.top / total) * 100, 0),
+1 -1
View File
@@ -1939,9 +1939,9 @@ header.page-header h1 {
} }
.zeitfresser-floating-toc__progress-bar { .zeitfresser-floating-toc__progress-bar {
display: block;
height: 100%; height: 100%;
width: 0; width: 0;
background: var(--hover-color); background: var(--hover-color);
transition: width 0.18s ease; transition: width 0.18s ease;
} }