mirror of
https://github.com/inspec/inspec
synced 2024-11-10 15:14:23 +00:00
disable particle animation if users prefer reduced motion (#2023)
Signed-off-by: Knut Hühne <knut@k-nut.eu>
This commit is contained in:
parent
6949e9a8fb
commit
1e8ce74613
1 changed files with 3 additions and 1 deletions
|
@ -4,6 +4,8 @@
|
|||
|
||||
/* To load a config file (particles.json) you need to host this demo (MAMP/WAMP/local)... */
|
||||
|
||||
var animate = !window.matchMedia('(prefers-reduced-motion)').matches;
|
||||
|
||||
particlesJS.load('particles-js', 'particles-second' , 'particles.json', function() {
|
||||
console.log('particles.js loaded - callback');
|
||||
});
|
||||
|
@ -68,7 +70,7 @@ particlesJS('particles-second',
|
|||
"width": 1
|
||||
},
|
||||
"move": {
|
||||
"enable": true,
|
||||
"enable": animate,
|
||||
"speed": 4,
|
||||
"direction": "none",
|
||||
"random": true,
|
||||
|
|
Loading…
Reference in a new issue