From e5681598caca32a8054ceb16a09188a2c80c6bdb Mon Sep 17 00:00:00 2001 From: Divya Jain Date: Sun, 16 Jun 2024 21:29:21 +0530 Subject: [PATCH] :truck: move animation to layout --- src/components/Header.astro | 12 ------------ src/layouts/BaseLayout.astro | 12 ++++++++++++ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/components/Header.astro b/src/components/Header.astro index b12a074..01264c5 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -26,16 +26,4 @@ const { withGradient = false } = Astro.props; font-size: var(--text-base); } } - - @keyframes gradient-animation { - 0% { - background-position: 0% 50%; - } - 50% { - background-position: 100% 50%; - } - 100% { - background-position: 0% 50%; - } - } diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index 8303ea6..934caad 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -138,6 +138,18 @@ const { title } = Astro.props as Props; animation: gradient-animation 120s ease infinite; } + @keyframes gradient-animation { + 0% { + background-position: 0% 50%; + } + 50% { + background-position: 100% 50%; + } + 100% { + background-position: 0% 50%; + } + } + .preload * { -webkit-transition: none !important; -moz-transition: none !important;