We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1fe28ce commit 9af116cCopy full SHA for 9af116c
spock-website/src/main.ts
@@ -2,9 +2,12 @@ import './style.css'
2
import './icons'
3
import AOS from 'aos'
4
5
+const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
6
+const disableAosByQuery = new URLSearchParams(window.location.search).get('disableaos') !== null;
7
+
8
AOS.init({
9
duration: 800, // Animation duration
10
once: true, // Whether animation should happen only once - while scrolling down
11
offset: 50, // Offset (in px) from the original trigger point
- disable: new URLSearchParams(window.location.search).get('disableaos') !== null,
12
+ disable: prefersReducedMotion || disableAosByQuery,
13
});
0 commit comments