Skip to content

Commit d8d0c22

Browse files
committed
feat: improve actionhero animation
1 parent d4939bc commit d8d0c22

1 file changed

Lines changed: 14 additions & 13 deletions

File tree

src/components/sections/ActionHeroSection.tsx

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,7 @@ export function ActionHeroSection({ action, locale, content }: { action: ActionI
4747
<Section showFunnel={false} className="w-full">
4848
<div className="relative overflow-hidden rounded-4xl border border-white/5 bg-light/35 h-[min(58svh,620px)] md:h-[min(62dvh,680px)]">
4949
<Grainient {...grainientColors} />
50-
<div
51-
aria-hidden="true"
52-
className="pointer-events-none absolute inset-0 z-1 bg-[linear-gradient(90deg,rgba(5,8,18,0.64)_0%,rgba(5,8,18,0.4)_42%,rgba(5,8,18,0.16)_100%)]"
53-
/>
50+
<div aria-hidden="true" className="pointer-events-none absolute inset-0 z-1 bg-[linear-gradient(90deg,rgba(5,8,18,0.64)_0%,rgba(5,8,18,0.4)_42%,rgba(5,8,18,0.16)_100%)]" />
5451
<StaggerContainer className="relative z-10 flex h-full flex-col items-center justify-between gap-8 p-8 lg:flex-row lg:p-16">
5552
<div className="flex w-full flex-col gap-4 text-left lg:w-1/2">
5653
{content?.badge && (
@@ -93,17 +90,21 @@ export function ActionHeroSection({ action, locale, content }: { action: ActionI
9390
)}
9491
</div>
9592
<StaggerItem className="flex w-full items-center justify-center gap-0 lg:w-1/2">
96-
<div className="flex size-28 shrink-0 items-center justify-center rounded-3xl border border-white/10 bg-primary text-white sm:size-32">
97-
<ActionIcon icon={action.icon} size={64} />
93+
<div className="flex size-28 shrink-0 items-center justify-center rounded-3xl border border-white/25 bg-white p-4 shadow-[0_0_0_4px_rgba(255,255,255,0.045),0_12px_32px_rgba(0,0,0,0.18)] sm:size-32">
94+
<Image src="/code0_logo_white.png" alt="Code0" width={80} height={80} className="size-full object-contain invert" />
9895
</div>
99-
<div className="relative h-1 w-10 overflow-hidden bg-brand/20 sm:w-16">
100-
<div
101-
className="absolute inset-y-0 w-2/5 bg-brand shadow-[0_0_12px_var(--color-brand)]"
102-
style={{ animation: "action-hero-pulse 1.8s ease-in-out infinite", willChange: "left, opacity" }}
103-
/>
96+
<div className="flex w-10 flex-col gap-3 sm:w-16">
97+
{[0, 0.22, 0.44].map((delay) => (
98+
<div key={delay} className="relative h-0.5 overflow-hidden bg-white/25">
99+
<div
100+
className="absolute inset-y-0 w-2/5 bg-white shadow-[0_0_8px_rgba(255,255,255,0.9)]"
101+
style={{ animation: "action-hero-pulse 1.8s linear infinite", animationDelay: `${delay}s`, willChange: "left, opacity" }}
102+
/>
103+
</div>
104+
))}
104105
</div>
105-
<div className="flex size-28 shrink-0 items-center justify-center rounded-3xl border border-white/10 bg-white p-4 sm:size-32">
106-
<Image src="/code0_logo_white.png" alt="Code0" width={80} height={80} className="size-full object-contain invert" />
106+
<div className="flex size-28 shrink-0 items-center justify-center rounded-3xl border border-white/20 bg-primary text-white shadow-[0_0_0_4px_rgba(255,255,255,0.035),0_12px_32px_rgba(0,0,0,0.22)] sm:size-32">
107+
<ActionIcon icon={action.icon} size={64} />
107108
</div>
108109
</StaggerItem>
109110
</StaggerContainer>

0 commit comments

Comments
 (0)