-
-
Couldn't load subscription status.
- Fork 12.7k
Added back-to-top button changes #5848
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Automated Quality Checks (from CONTRIBUTING minimum standards)
These checks are a best-effort automation and do not replace human review. |
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
tmpl/index.tmpl.html (2)
92-94: Add an explicit accessible label.Screen readers will only announce the bare ▲ glyph. Add an aria-label (or visually hidden text) so the purpose is announced clearly.
- <button onclick="scrollToTop()" id="backToTopBtn" title="Go to top"> + <button + type="button" + onclick="scrollToTop()" + id="backToTopBtn" + title="Go to top" + aria-label="Back to top" + >
100-120: UseaddEventListenerand set the initial state.Overwriting
window.onscrollmakes this fragile if another handler is added, and the button stays hidden on load when landing mid-page. Hook withaddEventListenerand callscrollFunction()once after attaching.- window.onscroll = function () { - scrollFunction(); - }; + window.addEventListener("scroll", scrollFunction); + scrollFunction();
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
tmpl/assets/awesome-go.css(3 hunks)tmpl/index.tmpl.html(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Codacy Static Code Analysis
|
This PR introduces a “Back to Top” button to enhance user experience and navigation on long pages of the Awesome-Go website. Changes Made: Updated index.tmpl.html to include the button markup. Modified awesome-go.css to add button styles (positioning, hover effects, smooth scrolling). Verified functionality locally using go run main.go and browser testing. Notes: No Go packages were modified or added. The change only affects the website’s front-end (HTML/CSS). The out/ directory remains ignored as per .gitignore. Related Issue: Checklist: I have read the Contribution Guidelines. I have read the Maintainers’ Note. I have verified that this change does not impact any Go packages. The modification follows the existing website style and structure. Tested locally and confirmed working as expected. Summary by CodeRabbit: New Feature: Added a back-to-top button with smooth scroll and hover feedback. Style: Reformatted CSS for consistency. Chores: Streamlined analytics script loading and standardized third-party script tags. |
| padding: 6px; | ||
| } | ||
|
|
||
| /* Add this CSS to your awesome-go.css file */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am going to modify your code before merging it, are you fine with that?
Or you can do the following changes and then I will merge it after further review.
- Formatting changes should be removed OR add separate commits for formatting and the back-to-top changes.
- Remove these LLM generated comments. only leave any helpful comments.
|
Hi @divyaverma-01, the automated checks for this PR failed. Please review the build logs and fix the issues. Specifically, the |
Description
This PR introduces a “Back to Top” button on the Awesome-Go website to improve user experience and navigation, especially on long pages.
Changes Made:
Notes:
Related issue
fixes #5846
Checklist
Summary by CodeRabbit
New Features
Style
Chores