From dfa863369b67a7025630b7527f8e5e55f4444f33 Mon Sep 17 00:00:00 2001 From: saicaca Date: Tue, 12 Mar 2024 16:13:10 +0800 Subject: [PATCH] feat: onload animation --- src/components/GlobalStyles.astro | 29 +++++++++++++++++++++++++++++ src/layouts/MainGridLayout.astro | 9 +++++---- 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/src/components/GlobalStyles.astro b/src/components/GlobalStyles.astro index a2c8fc1..44759a9 100644 --- a/src/components/GlobalStyles.astro +++ b/src/components/GlobalStyles.astro @@ -245,4 +245,33 @@ color_set({ } } +@keyframes fade-in-up { + 0% { + transform: translateY(2rem); + opacity: 0; + } + 100% { + transform: translateY(0); + opacity: 1; + } +} +.onload-animation { + opacity: 0; + animation: 600ms fade-in-up; + animation-fill-mode: forwards; +} +#top-row { + animation-delay: 0ms +} +#sidebar { + animation-delay: 150ms +} +#content-wrapper { + animation-delay: 350ms; +} +#footer { + animation-delay: 500ms; +} + + \ No newline at end of file diff --git a/src/layouts/MainGridLayout.astro b/src/layouts/MainGridLayout.astro index 52276b8..c7cabc6 100644 --- a/src/layouts/MainGridLayout.astro +++ b/src/layouts/MainGridLayout.astro @@ -22,12 +22,13 @@ const enableBanner = siteConfig.banner.enable
-
+
+
- + -
+
@@ -35,7 +36,7 @@ const enableBanner = siteConfig.banner.enable
-
+