feat: add reducemotion config option to optimize performance

- Add `reduceMotion` option in theme config to improve performance
- Update Button component to support reduced animations
- Modify GSAP animation logic to adapt to the new configuration
- Update documentation to reflect the new feature
This commit is contained in:
radishzzz 2025-05-19 14:54:59 +01:00
parent 120ebbbb3f
commit 4d247cfb93
12 changed files with 77 additions and 42 deletions

View file

@ -58,10 +58,12 @@ export const themeConfig: ThemeConfig = {
fontStyle: 'sans', // sans, serif
// date format for posts
dateFormat: 'YYYY-MM-DD', // YYYY-MM-DD, MM-DD-YYYY, DD-MM-YYYY, MONTH DAY YYYY, DAY MONTH YYYY
// enable KaTeX for mathematical formulas rendering
katex: true, // true, false
// enable table of contents for all posts by default
toc: true, // true, false
// enable KaTeX for mathematical formulas rendering
katex: true, // true, false
// reduce animations and transitions to improve performance
reduceMotion: false, // true, false
},
// GLOBAL SETTINGS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> END
@ -143,7 +145,7 @@ export const themeConfig: ThemeConfig = {
{
name: 'Email',
url: 'email@radishzz.cc',
}
},
// {
// name: 'X',
// url: 'https://x.com/radishzz_',