Design language
This commit is contained in:
@@ -37,6 +37,10 @@
|
||||
|
||||
let revealObserver: IntersectionObserver | null = null;
|
||||
|
||||
function shouldAnimateAnchorBounce() {
|
||||
return typeof window !== 'undefined' && window.innerWidth > 768;
|
||||
}
|
||||
|
||||
function initReveal() {
|
||||
revealObserver?.disconnect();
|
||||
|
||||
@@ -64,6 +68,8 @@
|
||||
}
|
||||
|
||||
function bounceSection(hash: string) {
|
||||
if (!shouldAnimateAnchorBounce()) return;
|
||||
|
||||
const id = hash.startsWith('#') ? hash.slice(1) : hash;
|
||||
if (!id) return;
|
||||
// Wait for smooth scroll to finish before playing the bounce
|
||||
|
||||
Reference in New Issue
Block a user