mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-16 11:41:17 +02:00
fix: resolve gsap animation flash on page load
- Add initial state styles for animated elements in CSS - Change GSAP animations from .from() to .to() method - Move reduce-motion class from JS to server-side HTML - Improve performance by eliminating DOM flash - Enhance code readability with better formatting
This commit is contained in:
parent
ead71483ec
commit
c1996585a8
5 changed files with 68 additions and 43 deletions
|
@ -33,7 +33,11 @@ const MarginBottom = isPost && themeConfig.comment?.enabled
|
|||
|
||||
<html
|
||||
lang={Astro.currentLocale}
|
||||
class:list={[fontStyle, { 'scroll-smooth': isPost }]}
|
||||
class:list={[
|
||||
fontStyle,
|
||||
{ 'scroll-smooth': isPost },
|
||||
{ 'reduce-motion': themeConfig.global.reduceMotion },
|
||||
]}
|
||||
>
|
||||
<Head {postTitle} {postDescription} {postSlug} />
|
||||
<body>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue