From 1f37262d87d568fbbcc290b553ff88624b868a0d Mon Sep 17 00:00:00 2001 From: Bohdan Chornokondratenko Date: Fri, 16 Aug 2024 21:00:48 +0200 Subject: [PATCH] feat(landing): HeroSection AlternatingText --- src/features/landing/sections/HeroSection.tsx | 20 +++++++++++++++++-- tailwind.config.ts | 6 ++++++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/src/features/landing/sections/HeroSection.tsx b/src/features/landing/sections/HeroSection.tsx index 7715084..b13a979 100644 --- a/src/features/landing/sections/HeroSection.tsx +++ b/src/features/landing/sections/HeroSection.tsx @@ -18,8 +18,8 @@ export function HeroSection() { speedcubing -

- Compete with our online contests +

+ with our online contests

Start cubing now @@ -54,6 +54,22 @@ export function HeroSection() { ) } +function AlternatingText({ text1, text2, text3 }: { text1: string; text2: string; text3: string }) { + return ( + + + {text1} + + + {text2} + + + {text3} + + + ) +} + function TwistySection() { const player = useTwistyPlayer('R U', 'R U') diff --git a/tailwind.config.ts b/tailwind.config.ts index 7e8d2d9..bd32880 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -64,10 +64,16 @@ export default { from: { transform: 'rotate(0deg)' }, to: { transform: 'rotate(360deg)' }, }, + 'landing-alternating-text': { + '0%,20%': { transform: 'translateY(80%)' }, + '33.3%,53.3%': { transform: 'translateY(0)' }, + '66.6%,86.6%,100%': { transform: 'translateY(-80%)' }, + }, }, animation: { 'accordion-down': 'accordion-down 0.2s ease-out', 'accordion-up': 'accordion-up 0.2s ease-out', + 'landing-alternating-text': 'landing-alternating-text 6s ease-in infinite', }, spacing: { 15: '3.75rem',