Skip to content

Add back-to-top button with golgappa icon to all pages#492

Open
Tejashwini200532 wants to merge 2 commits into
PatelHarsh2006:mainfrom
Tejashwini200532:back-to-top-button
Open

Add back-to-top button with golgappa icon to all pages#492
Tejashwini200532 wants to merge 2 commits into
PatelHarsh2006:mainfrom
Tejashwini200532:back-to-top-button

Conversation

@Tejashwini200532
Copy link
Copy Markdown

Fixes #64

Description

Added a "Back to Top" button with a golgappa icon to all pages for improved user experience and navigation.

Pages Updated

  • ✅ Home (index.html)
  • ✅ Menu (menu.html)
  • ✅ Cart (cart.html)
  • ✅ Favorites (favorites.html)
  • ✅ Orders (orders.html)
  • ✅ Recommendations (recommendations.html)

Changes Made

  1. Added back-to-top button HTML to all pages
  2. Added CSS styling for the button (.back-to-top-container, #backToTop, .back-to-top-text)
  3. Created initBackToTopButton() function in js/main.js
  4. Integrated function into init() for proper DOM readiness
  5. Merged latest changes from main branch

Technical Details

  • Button appears when user scrolls > 200px down
  • Smooth scroll animation to top
  • Fixed position with z-index: 9999
  • Hover effect with transform animation
  • Golgappa icon (img/golgappa.png)

Testing

  • Button appears/disappears on scroll correctly
  • Click handler works on all pages
  • No console errors
  • Works across all screen sizes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[UI Enhancement] Add Back-to-Top Button for Better Navigation Experience

1 participant