adds smooth scroll bar

This commit is contained in:
Billie
2026-06-02 23:51:23 +02:00
parent 6194a7c259
commit d9fed78a02
2 changed files with 11 additions and 5 deletions
+9 -3
View File
@@ -179,9 +179,15 @@ templ (v Views) bookmarkInfo(item *dataset.Bookmark, html io.Reader) {
<span class="sr-only">{ L(ctx).Gettext("Bookmark information") }</span>
</button>
</div>
if item.HasArticle {
<progress max="100" value={ item.ReadProgress } data-scroll-progress-target="indicator"></progress>
}
<progress
max="100"
if item.HasArticle {
value={ item.ReadProgress }
data-scroll-progress-target="indicator"
} else {
value="0"
}
></progress>
</div>
// title and description
<div
@@ -172,7 +172,7 @@ export default class extends Controller {
*/
updatePositionTargets(notify = true) {
this.valueTargets.forEach((t) => {
t.value = this.current.p
t.value = Math.round(this.current.p)
})
this.anchorTargets.forEach((t) => {
t.value = this.current.s
@@ -323,7 +323,7 @@ export default class extends Controller {
* @returns
*/
function toPercent(value) {
return Math.round(Math.min(value, 1) * 100)
return Math.min(value, 1) * 100
}
/**