Tweaked scrollToPostIndex logic
The old behaviour would scroll the post anchor to the midline, but this was inferior UX for long posts since the top half of the screen is essentially stuff you didn't want to see. The new logic is as follows: - If the target post is smaller than the browser viewport, it will scroll in such a way that the entire post is vertically centered (post midline matching viewport midline) - If the target post is larger than the browser viewport, it will scroll in such a way that the top of the post is located just under the navbar, maximizing the target post's content. - Updated themes to relocate their anchors to in between postsv1.18.x
parent
3b4b832f75
commit
5d4f61ec96
Loading…
Reference in New Issue