From ecfc163255b83fcc9e2ba8d975d898b353021fe1 Mon Sep 17 00:00:00 2001 From: Atridad Lahiji Date: Mon, 22 Dec 2025 15:10:17 -0700 Subject: [PATCH] Added scrolling text --- src/components/sections/HeroSection.astro | 35 +++++++++++++++++++---- src/config/site.ts | 7 ++++- src/styles/global.css | 5 ++++ 3 files changed, 41 insertions(+), 6 deletions(-) diff --git a/src/components/sections/HeroSection.astro b/src/components/sections/HeroSection.astro index 8c5cb78..3d24344 100644 --- a/src/components/sections/HeroSection.astro +++ b/src/components/sections/HeroSection.astro @@ -18,6 +18,10 @@ const statusColor = yellow: "bg-warning", red: "bg-error", }[statusColorConfig] || "bg-success"; + +const rotatingText = (siteConfig.hero as any).rotatingText as + | { text: string; className: string }[] + | undefined; ---
@@ -44,11 +48,32 @@ const statusColor =

", - )} - /> + > + { + siteConfig.hero.mainTitle + .split("{rotating}") + .map((part, index, array) => ( + <> + {part} + {index < array.length - 1 && rotatingText && ( + + + + {rotatingText.map((item) => ( + + {item.text} + + ))} + + + + )} + + )) + } +