From 183e89ae1e323be73006b1f0d60bfec092ad5347 Mon Sep 17 00:00:00 2001 From: Hyogeun Oh Date: Thu, 21 Nov 2024 13:41:12 +0900 Subject: [PATCH] Add `motion.duration` configuration (#846) --- _config.yml | 1 + source/js/motion.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/_config.yml b/_config.yml index e6ebedc05..ebe69232e 100644 --- a/_config.yml +++ b/_config.yml @@ -628,6 +628,7 @@ quicklink: motion: enable: true async: false + duration: 200 transition: # All available transition variants: https://theme-next.js.org/animate/ menu_item: fadeInDown diff --git a/source/js/motion.js b/source/js/motion.js index 02bcc9db4..0a472e053 100644 --- a/source/js/motion.js +++ b/source/js/motion.js @@ -17,7 +17,7 @@ NexT.motion.integrator = { if (!CONFIG.motion.async) this.queue = [this.queue.flat()]; this.queue.forEach(sequence => { const timeline = window.anime.timeline({ - duration: 200, + duration: CONFIG.motion?.duration ?? 200, easing : 'linear' }); sequence.forEach(item => {