Skip to content

Commit ca60c4d

Browse files
committed
fix: standardize ProductPrinciples header styling
- Import motion, BlurReveal, and SectionTitle components - Replace custom header with consistent SectionTitle component - Add motion animations for header, navigation, and content sections - Match styling with other sections (MissionVision, etc.) - Ensure consistent visual hierarchy across all sections - Maintain existing functionality while improving visual consistency
1 parent 74a3a80 commit ca60c4d

File tree

1 file changed

+48
-14
lines changed

1 file changed

+48
-14
lines changed

src/components/ProductPrinciples.tsx

Lines changed: 48 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22

33
import { useState, useEffect, useRef } from 'react';
44
import { Clock, Sparkles, TrendingUp } from 'lucide-react';
5+
import { motion } from 'framer-motion';
56
import { useLanguage } from '@/contexts/LanguageContext';
67
import { RewardCounter } from './RewardCounter';
78
import { DelightInteraction } from './DelightInteraction';
89
import { ScalableGrowth } from './ScalableGrowth';
10+
import { BlurReveal } from './BlurReveal';
11+
import { SectionTitle } from './SectionTitle';
912

1013
const BUZZVIL_PRINCIPLES = [
1114
{
@@ -135,20 +138,48 @@ const ProductPrinciples = () => {
135138
}
136139
}, [selectedPrinciple]);
137140

141+
const containerVariants = {
142+
hidden: { opacity: 0 },
143+
visible: {
144+
opacity: 1,
145+
transition: {
146+
staggerChildren: 0.2,
147+
},
148+
},
149+
};
150+
151+
const itemVariants = {
152+
hidden: { opacity: 0, y: 30 },
153+
visible: { opacity: 1, y: 0 },
154+
};
155+
138156
return (
139-
<section ref={principlesSectionRef} className="py-20">
140-
<div className="max-w-7xl mx-auto px-8">
141-
<div className="text-center mb-16">
142-
<h2 className="text-5xl md:text-7xl font-bold mb-6 bg-gradient-to-r from-foreground to-muted-foreground bg-clip-text text-transparent">
143-
{t('principles.title')}
144-
</h2>
145-
<p className="text-xl text-muted-foreground max-w-3xl mx-auto">
146-
{t('principles.subtitle')}
147-
</p>
148-
</div>
157+
<section ref={principlesSectionRef} className="py-20 px-4 sm:px-6 lg:px-8">
158+
<div className="max-w-7xl mx-auto">
159+
<motion.div
160+
variants={containerVariants}
161+
initial="hidden"
162+
whileInView="visible"
163+
viewport={{ once: true, margin: "-100px" }}
164+
className="text-center mb-16"
165+
>
166+
<BlurReveal>
167+
<SectionTitle>
168+
<h2 className="text-4xl md:text-5xl font-bold text-white mb-6">
169+
{t('principles.title')}
170+
</h2>
171+
<p className="text-xl text-muted-foreground max-w-3xl mx-auto">
172+
{t('principles.subtitle')}
173+
</p>
174+
</SectionTitle>
175+
</BlurReveal>
176+
</motion.div>
149177

150178
{/* Principle Navigation */}
151-
<div className="flex justify-center mb-12 px-4">
179+
<motion.div
180+
variants={itemVariants}
181+
className="flex justify-center mb-12 px-4"
182+
>
152183
<div className="overflow-x-auto scrollbar-hide bg-muted/30 p-2 rounded-xl max-w-full">
153184
<div
154185
ref={principlesNavRef}
@@ -171,10 +202,13 @@ const ProductPrinciples = () => {
171202
))}
172203
</div>
173204
</div>
174-
</div>
205+
</motion.div>
175206

176207
{/* Principle Content with Enhanced 3D Transitions */}
177-
<div className="max-w-4xl mx-auto">
208+
<motion.div
209+
variants={itemVariants}
210+
className="max-w-4xl mx-auto"
211+
>
178212
<div
179213
className="relative overflow-hidden perspective-1000"
180214
onMouseEnter={() => setIsHovered(true)}
@@ -241,7 +275,7 @@ const ProductPrinciples = () => {
241275
})}
242276
</div>
243277
</div>
244-
</div>
278+
</motion.div>
245279
</div>
246280
</section>
247281
);

0 commit comments

Comments
 (0)