cncf/dot-org-hugo-theme

Feature: Back to top triangle on long pages

Closed this issue · 0 comments

This one is a nice-to-have / low priority feature.

Basically, on my site I roughly have to kind of pages.

  1. Short topic specific
  2. Long documentation

The second kind tends to become really long and once you reach the bottom, it's a long scroll back to the top.

Example: https://deepcausality.com/docs/intro/

What would be ideal is this back to top triangle that jumps right back to the top of the page.

Example: The Guardian

Screenshot 2023-09-17 at 7 26 59 PM

Ideally, this triangle would appear the moment you start scrolling down. If the page isn't long enough, it never appears. Or, setting a boolean flag in the front-matter of the markdown file would be an alternative way to enable/disable the triangle as it's not always needed or wanted.

Also the text "Back to top" might be good as a tooltip that pop's up when hovering over the triangle just to conserve valuable space on mobile.

Currently, I have bypassed the problem by linking to the next page at the bottom of the current page hence this is really low priority but definitely nice to have.