glitchassassin / armorer

Renders the King James Version as a performant, minimal, well-designed reading website
https://armorer.io/
Other
0 stars 0 forks source link

Better verse-scrolling support #24

Closed glitchassassin closed 10 months ago

glitchassassin commented 1 year ago

Currently, if the selected verse is towards the end of the chapter, navigating by verse (e.g. https://armorer.io/2-timothy/1/#18) will show the verse anywhere on the screen rather than at the top (since the page stops scrolling at the bottom).

A better UX would be to consistently scroll to the verse regardless of its position in the chapter (and perhaps subtly highlight the verse).

One way to accomplish this would be to just have a 100VH div below all the chapters, so it can scroll to the position even if the next chapter isn't loaded yet. This may create a flash of empty space before loading the chapter.

Another option may be to include the next chapter in each static page, without the verse number IDs. (While we're at it, we may want to dynamically hide the verse IDs in chapters that aren't "current" based on the URL.) This should get us closer, but for shorter chapters like Psalms (and depending on the screen size) we may still come up short.

Perhaps a combination of the two will give the best compromise.