fixed toc progressbar
This commit is contained in:
+1
-1
@@ -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),
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user