smooth-scroll on hash nav
Anchor links like /#bundles, /#revitalize, /#about now smooth-scroll to their target instead of jumping. Reverts the earlier instant-jump choice — for the homepage nav, the animation is the desired feedback. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -166,7 +166,7 @@ const router = createRouter({
|
||||
// not honoured so users land at a predictable position rather than
|
||||
// wherever they last scrolled to.
|
||||
scrollBehavior(to) {
|
||||
if (to.hash) return { el: to.hash }
|
||||
if (to.hash) return { el: to.hash, behavior: 'smooth' }
|
||||
return { top: 0 }
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user