JS vue was better for this. the pure CSS animation kinda sucks.

This commit is contained in:
2026-02-25 09:05:08 -07:00
parent 483e80db79
commit d460270ca9
2 changed files with 2 additions and 29 deletions

View File

@@ -1,27 +0,0 @@
---
interface Props {
items: Array<{
text: string;
className: string;
}>;
}
const { items } = Astro.props;
---
<span class="text-rotate duration-9000">
<span>
{
items.map((item) => (
<span
class:list={[
"mx-auto text-center pointer-events-none",
item.className,
]}
>
{item.text}
</span>
))
}
</span>
</span>

View File

@@ -2,7 +2,7 @@
import { siteConfig } from "../../config/site";
import Icon from "../Icon.astro";
import Section from "../Section.astro";
import RotatingText from "../RotatingText.astro";
import RotatingText from "../RotatingText.vue";
import StatusIndicator from "../StatusIndicator.vue";
const rotatingText = (siteConfig.hero as any).rotatingText as
@@ -30,7 +30,7 @@ const rotatingText = (siteConfig.hero as any).rotatingText as
{
rotatingText ? (
<>
<RotatingText items={rotatingText} />
<RotatingText items={rotatingText} client:idle />
<span class="block">
{siteConfig.hero.mainTitle
.replace("{rotating}", "")