mirror of
https://codeberg.org/readeck/readeck.git
synced 2026-06-18 11:04:36 +00:00
adds smooth scroll bar
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user