feat:add smooth scrolling to the website#428
Conversation
|
@saishnimbalkar397 is attempting to deploy a commit to the komalsony234-1530's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@komalharshita please review |
komalharshita
left a comment
There was a problem hiding this comment.
Thank you for the contribution. After reviewing the implementation, I found several issues that should be addressed before this PR can be merged:
- The Lenis initialization code is duplicated across multiple templates instead of reusing the existing global script.
- The PR introduces an external CDN dependency without a fallback strategy.
- Smooth scrolling does not respect the user's prefers-reduced-motion accessibility setting.
- An unrelated file rename is included in the PR.
Please address these concerns and request another review once they have been resolved.
- Move initialization to global script to remove duplication - Add prefers-reduced-motion check for accessibility - Switch from CDN to local npm package import - Revert accidental file rename
|
Hi @komalharshita , Thank you for the thorough review. I've updated the branch and addressed all of your feedback: Code Duplication: Moved the Lenis initialization into the global script so it's no longer duplicated across individual templates. CDN Dependency: Switched from the external CDN script tag to a local npm package import via Vite. Accessibility: Wrapped the initialization in a prefers-reduced-motion media query check. Smooth scrolling will now automatically bypass for users who prefer reduced motion. File Rename: Reverted the accidental file rename back to match the main branch. Please let me know if everything looks good now or if there is anything else you'd like me to adjust!
|
komalharshita
left a comment
There was a problem hiding this comment.
Looks good to merge now!
|
@saishnimbalkar397 kindly resolve the merge conflicts |
|
@komalharshita done |

Summary [required]
In this PR i have added lenis js for smooth scrolling through the website and enhance the user experience through all pages of the website
Related Issue [required]
Closes #397
Type of Change [required]
What Was Changed [required]
Added lenis.js cdn:
index.html - Main homepage
project.html - Project detail page
404.html - Error page
405.html - Error page
500.html - Error page
Added Lenis initialization in script.js:
Configured smooth scrolling with duration of 1.2s
Used easing function for natural deceleration
Enabled smooth wheel scrolling
Integrated with anchor links (all # links now scroll smoothly)
Wrapped in IIFE to avoid global scope pollution
For error pages (404, 405, 500):
Added inline initialization since they don't use the main script.js
Test Results [required]

Screenshots (if UI change)
smooth scrolling has been added,if you want to go a mile ahead i could record my screen an show it to you