Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR introduces a reusable JavaScript plugin for a scroll-to-top button that appears when the user scrolls down a certain threshold on the page. This improves navigation and user experience by allowing quick access back to the top of the page with a single click. The button is initially hidden and only appears after the user has scrolled down 200 pixels from the top of the document. This feature has been implemented across all pages by including it in a common EJS partial.
Fixes #527
Video
Screencast from 2024-11-10 14-49-04.webm
Type of change
Bug fix (non-breaking change which fixes an issue)
How should this be tested?
To ensure the scroll-to-top button functions correctly, the following steps should be taken:
Scroll down on any page to see if the button appears after approximately 200 pixels.
Click the button to ensure it returns the page to the top smoothly.
Verify the button is hidden when the page is loaded and reappears upon scrolling down again.