website landing page
This commit is contained in:
@@ -1,59 +1,109 @@
|
||||
'use client';
|
||||
|
||||
import { motion, useReducedMotion } from 'framer-motion';
|
||||
import { useState, useEffect } from 'react';
|
||||
|
||||
export default function CareerProgressionMockup() {
|
||||
const shouldReduceMotion = useReducedMotion();
|
||||
const [isMobile, setIsMobile] = useState(false);
|
||||
|
||||
const containerVariants = {
|
||||
hidden: { opacity: 0 },
|
||||
visible: {
|
||||
opacity: 1,
|
||||
transition: { staggerChildren: shouldReduceMotion ? 0 : 0.08 }
|
||||
}
|
||||
};
|
||||
useEffect(() => {
|
||||
const checkMobile = () => setIsMobile(window.innerWidth < 768);
|
||||
checkMobile();
|
||||
window.addEventListener('resize', checkMobile);
|
||||
return () => window.removeEventListener('resize', checkMobile);
|
||||
}, []);
|
||||
|
||||
const itemVariants = {
|
||||
hidden: { opacity: 0, x: shouldReduceMotion ? 0 : -20 },
|
||||
visible: { opacity: 1, x: 0 }
|
||||
hidden: { opacity: 0, y: shouldReduceMotion ? 0 : 8 },
|
||||
visible: { opacity: 1, y: 0 }
|
||||
};
|
||||
|
||||
// Simple mobile version - just the essence
|
||||
if (isMobile) {
|
||||
return (
|
||||
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite to-iron-gray rounded-lg p-4 overflow-hidden flex items-center justify-center">
|
||||
<motion.div
|
||||
initial="hidden"
|
||||
animate="visible"
|
||||
variants={{
|
||||
visible: { transition: { staggerChildren: 0.1 } }
|
||||
}}
|
||||
className="space-y-4 w-full"
|
||||
>
|
||||
{/* Clean stat cards */}
|
||||
<motion.div variants={itemVariants} className="grid grid-cols-3 gap-3">
|
||||
{[
|
||||
{ value: '24', label: 'Wins' },
|
||||
{ value: '48', label: 'Podiums' },
|
||||
{ value: '156', label: 'Races' }
|
||||
].map((stat, i) => (
|
||||
<div key={i} className="bg-iron-gray/60 rounded-lg p-3 border border-primary-blue/20 text-center">
|
||||
<div className="text-2xl font-bold text-primary-blue font-mono">{stat.value}</div>
|
||||
<div className="text-[11px] text-white/50 mt-1">{stat.label}</div>
|
||||
</div>
|
||||
))}
|
||||
</motion.div>
|
||||
|
||||
{/* Single elegant season card */}
|
||||
<motion.div variants={itemVariants}>
|
||||
<div className="bg-iron-gray/40 rounded-lg p-3 border border-charcoal-outline">
|
||||
<div className="flex items-center justify-between">
|
||||
<span className="text-sm text-white/70">GT3 Championship</span>
|
||||
<span className="px-2.5 py-1 bg-performance-green/20 rounded text-xs text-performance-green font-semibold">P2</span>
|
||||
</div>
|
||||
</div>
|
||||
</motion.div>
|
||||
</motion.div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
// Desktop version - more detailed
|
||||
return (
|
||||
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg p-8 overflow-hidden">
|
||||
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg p-1.5 sm:p-3 md:p-5 lg:p-8 overflow-hidden">
|
||||
<motion.div
|
||||
variants={containerVariants}
|
||||
initial="hidden"
|
||||
animate="visible"
|
||||
className="space-y-6"
|
||||
variants={{
|
||||
visible: { transition: { staggerChildren: shouldReduceMotion ? 0 : 0.08 } }
|
||||
}}
|
||||
className="space-y-1.5 sm:space-y-3 md:space-y-4 lg:space-y-6"
|
||||
>
|
||||
{/* Driver Header */}
|
||||
<motion.div variants={itemVariants} className="flex items-center gap-4 pb-6 border-b border-charcoal-outline">
|
||||
<div className="h-16 w-16 bg-charcoal-outline rounded-full border-2 border-primary-blue/30"></div>
|
||||
<motion.div variants={itemVariants} className="flex items-center gap-1.5 sm:gap-2 md:gap-3 lg:gap-4 pb-1.5 sm:pb-3 md:pb-4 lg:pb-6 border-b border-charcoal-outline">
|
||||
<div className="h-8 w-8 sm:h-10 sm:w-10 md:h-12 md:w-12 lg:h-16 lg:w-16 bg-charcoal-outline rounded-full border-2 border-primary-blue/30 flex items-center justify-center text-base sm:text-xl md:text-2xl lg:text-3xl overflow-hidden">
|
||||
🏎️
|
||||
</div>
|
||||
<div className="flex-1">
|
||||
<div className="h-4 w-40 bg-white/10 rounded mb-2"></div>
|
||||
<div className="flex items-center gap-3">
|
||||
<div className="h-3 w-24 bg-primary-blue/20 rounded"></div>
|
||||
<div className="h-3 w-20 bg-performance-green/20 rounded"></div>
|
||||
<div className="text-[9px] sm:text-xs md:text-sm font-semibold text-white/90 mb-1 sm:mb-1.5 md:mb-2">Your Racing Identity</div>
|
||||
<div className="flex items-center gap-1 sm:gap-2 md:gap-3">
|
||||
<span className="text-[8px] sm:text-[10px] md:text-xs text-primary-blue/70">Multi-league profile</span>
|
||||
<span className="text-[8px] sm:text-[10px] md:text-xs text-performance-green/70">Career tracking</span>
|
||||
</div>
|
||||
</div>
|
||||
</motion.div>
|
||||
|
||||
{/* Career Stats */}
|
||||
<motion.div variants={itemVariants}>
|
||||
<div className="text-sm font-semibold text-white/60 mb-3">Career Overview</div>
|
||||
<div className="grid grid-cols-3 gap-3">
|
||||
{[1, 2, 3].map((i) => (
|
||||
<div className="text-[9px] sm:text-xs md:text-sm font-semibold text-white/60 mb-1 sm:mb-2 md:mb-3">Career Overview</div>
|
||||
<div className="grid grid-cols-3 gap-1 sm:gap-2 md:gap-3">
|
||||
{[
|
||||
{ label: 'Wins', value: '24' },
|
||||
{ label: 'Podiums', value: '48' },
|
||||
{ label: 'Races', value: '156' }
|
||||
].map((stat, i) => (
|
||||
<motion.div
|
||||
key={i}
|
||||
className="bg-iron-gray rounded-lg p-3 border border-charcoal-outline"
|
||||
className="bg-iron-gray rounded-lg p-1 sm:p-2 md:p-3 border border-charcoal-outline"
|
||||
whileHover={shouldReduceMotion ? {} : {
|
||||
y: -2,
|
||||
boxShadow: '0 4px 16px rgba(0,0,0,0.3)',
|
||||
transition: { duration: 0.15 }
|
||||
}}
|
||||
>
|
||||
<div className="h-6 w-12 bg-primary-blue/30 rounded mb-2 font-mono"></div>
|
||||
<div className="h-2 w-16 bg-white/5 rounded"></div>
|
||||
<div className="text-sm sm:text-base md:text-lg font-bold text-primary-blue font-mono mb-0.5">{stat.value}</div>
|
||||
<div className="text-[8px] sm:text-[10px] md:text-xs text-white/40">{stat.label}</div>
|
||||
</motion.div>
|
||||
))}
|
||||
</div>
|
||||
@@ -61,26 +111,32 @@ export default function CareerProgressionMockup() {
|
||||
|
||||
{/* Season Timeline */}
|
||||
<motion.div variants={itemVariants}>
|
||||
<div className="text-sm font-semibold text-white/60 mb-3">Season History</div>
|
||||
<div className="space-y-2">
|
||||
{[1, 2, 3].map((i) => (
|
||||
<div className="text-[9px] sm:text-xs md:text-sm font-semibold text-white/60 mb-1 sm:mb-2 md:mb-3">Season History</div>
|
||||
<div className="space-y-1 sm:space-y-1.5 md:space-y-2">
|
||||
{[
|
||||
{ league: 'GT3 Championship', season: 'S3', position: 'P2', points: '248' },
|
||||
{ league: 'Endurance Series', season: 'S2', position: 'P1', points: '312' },
|
||||
{ league: 'Formula Sprint', season: 'S1', position: 'P5', points: '186' }
|
||||
].map((season, i) => (
|
||||
<motion.div
|
||||
key={i}
|
||||
className="flex items-center gap-3 bg-iron-gray rounded-lg p-3 border border-charcoal-outline"
|
||||
className="flex items-center gap-1.5 sm:gap-2 md:gap-3 bg-iron-gray rounded-lg p-1.5 sm:p-2 md:p-3 border border-charcoal-outline"
|
||||
whileHover={shouldReduceMotion ? {} : {
|
||||
x: 4,
|
||||
boxShadow: '0 2px 12px rgba(25,140,255,0.2)',
|
||||
transition: { duration: 0.15 }
|
||||
}}
|
||||
>
|
||||
<div className="h-8 w-8 bg-charcoal-outline rounded border border-primary-blue/20"></div>
|
||||
<div className="flex-1">
|
||||
<div className="h-2.5 w-32 bg-white/10 rounded mb-1.5"></div>
|
||||
<div className="h-2 w-24 bg-white/5 rounded"></div>
|
||||
<div className="h-5 w-5 sm:h-6 sm:w-6 md:h-8 md:w-8 bg-charcoal-outline rounded border border-primary-blue/20 flex items-center justify-center text-xs sm:text-sm md:text-base">
|
||||
🏁
|
||||
</div>
|
||||
<div className="flex gap-2">
|
||||
<div className="h-6 w-8 bg-performance-green/20 rounded text-center font-mono"></div>
|
||||
<div className="h-6 w-8 bg-primary-blue/20 rounded text-center font-mono"></div>
|
||||
<div className="flex-1">
|
||||
<div className="text-[9px] sm:text-xs text-white/80 mb-0.5 sm:mb-1">{season.league}</div>
|
||||
<div className="text-[8px] sm:text-xs text-white/40">Season complete</div>
|
||||
</div>
|
||||
<div className="flex gap-1 sm:gap-1.5 md:gap-2">
|
||||
<div className="px-1 sm:px-1.5 md:px-2 py-0.5 bg-performance-green/20 rounded text-[8px] sm:text-[10px] md:text-xs text-performance-green font-semibold">{season.position}</div>
|
||||
<div className="px-1 sm:px-1.5 md:px-2 py-0.5 bg-primary-blue/20 rounded text-[8px] sm:text-[10px] md:text-xs text-primary-blue font-mono">{season.points}</div>
|
||||
</div>
|
||||
</motion.div>
|
||||
))}
|
||||
@@ -89,13 +145,15 @@ export default function CareerProgressionMockup() {
|
||||
|
||||
{/* Multi-League Badge */}
|
||||
<motion.div variants={itemVariants}>
|
||||
<div className="flex items-center gap-2 bg-charcoal-outline rounded-lg p-3 border border-primary-blue/30">
|
||||
<div className="flex items-center gap-1 sm:gap-1.5 md:gap-2 bg-charcoal-outline rounded-lg p-1.5 sm:p-2 md:p-3 border border-primary-blue/30">
|
||||
<div className="flex -space-x-2">
|
||||
{[1, 2, 3].map((i) => (
|
||||
<div key={i} className="h-6 w-6 bg-iron-gray rounded-full border-2 border-charcoal-outline"></div>
|
||||
<div key={i} className="h-4 w-4 sm:h-5 sm:w-5 md:h-6 md:w-6 bg-iron-gray rounded-full border-2 border-charcoal-outline flex items-center justify-center text-[8px] sm:text-[10px] md:text-xs">
|
||||
🏆
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
<div className="h-2 w-32 bg-white/5 rounded"></div>
|
||||
<span className="text-[8px] sm:text-[10px] md:text-xs text-white/60">Active in 3 leagues across seasons</span>
|
||||
</div>
|
||||
</motion.div>
|
||||
</motion.div>
|
||||
|
||||
@@ -1,110 +1,171 @@
|
||||
'use client';
|
||||
|
||||
import { motion, useReducedMotion } from 'framer-motion';
|
||||
import { useState, useEffect } from 'react';
|
||||
|
||||
export default function CompanionAutomationMockup() {
|
||||
const shouldReduceMotion = useReducedMotion();
|
||||
const [isMobile, setIsMobile] = useState(false);
|
||||
|
||||
const containerVariants = {
|
||||
hidden: { opacity: 0 },
|
||||
visible: {
|
||||
opacity: 1,
|
||||
transition: { staggerChildren: shouldReduceMotion ? 0 : 0.12 }
|
||||
}
|
||||
};
|
||||
useEffect(() => {
|
||||
const checkMobile = () => setIsMobile(window.innerWidth < 768);
|
||||
checkMobile();
|
||||
window.addEventListener('resize', checkMobile);
|
||||
return () => window.removeEventListener('resize', checkMobile);
|
||||
}, []);
|
||||
|
||||
const itemVariants = {
|
||||
hidden: { opacity: 0, y: shouldReduceMotion ? 0 : 10 },
|
||||
visible: { opacity: 1, y: 0 }
|
||||
};
|
||||
// Simple mobile version - just the essence of automation
|
||||
if (isMobile) {
|
||||
return (
|
||||
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite to-iron-gray rounded-lg p-4 overflow-hidden flex items-center justify-center">
|
||||
<motion.div
|
||||
initial={{ opacity: 0 }}
|
||||
animate={{ opacity: 1 }}
|
||||
className="space-y-4 w-full"
|
||||
>
|
||||
{/* Simple progress indicator */}
|
||||
<div className="bg-iron-gray/60 rounded-xl p-4 border border-primary-blue/40">
|
||||
<div className="flex items-center gap-3 mb-3">
|
||||
<motion.div
|
||||
className="h-8 w-8 bg-performance-green/40 rounded-full flex items-center justify-center border-2 border-performance-green/60 flex-shrink-0"
|
||||
animate={shouldReduceMotion ? {} : {
|
||||
scale: [1, 1.1, 1],
|
||||
opacity: [0.6, 1, 0.6]
|
||||
}}
|
||||
transition={{ duration: 1.5, repeat: Infinity }}
|
||||
>
|
||||
<div className="h-3 w-3 bg-performance-green rounded-full"></div>
|
||||
</motion.div>
|
||||
<div>
|
||||
<div className="text-sm text-white font-medium">Creating Session</div>
|
||||
<div className="text-xs text-white/50">Automated</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="h-2.5 w-full bg-white/5 rounded-full overflow-hidden">
|
||||
<motion.div
|
||||
className="h-full bg-primary-blue/60"
|
||||
initial={{ width: '0%' }}
|
||||
animate={{ width: '75%' }}
|
||||
transition={{ duration: 2, ease: 'easeInOut' }}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Simple CTA */}
|
||||
<div className="flex justify-center">
|
||||
<div className="bg-primary-blue/20 text-primary-blue px-6 py-2.5 rounded-lg border border-primary-blue/40 text-sm font-semibold">
|
||||
One Click
|
||||
</div>
|
||||
</div>
|
||||
</motion.div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
// Desktop version - richer with more automation steps
|
||||
return (
|
||||
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg p-8 overflow-hidden">
|
||||
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg p-3 md:p-4 lg:p-6 overflow-hidden">
|
||||
<motion.div
|
||||
variants={containerVariants}
|
||||
initial="hidden"
|
||||
animate="visible"
|
||||
className="space-y-6"
|
||||
variants={{
|
||||
hidden: { opacity: 0 },
|
||||
visible: {
|
||||
opacity: 1,
|
||||
transition: { staggerChildren: shouldReduceMotion ? 0 : 0.12 }
|
||||
}
|
||||
}}
|
||||
className="space-y-3 md:space-y-4 lg:space-y-5"
|
||||
>
|
||||
{/* Companion App Header */}
|
||||
<motion.div variants={itemVariants}>
|
||||
<div className="flex items-center gap-3 mb-6">
|
||||
<div className="h-10 w-10 bg-primary-blue/20 rounded-lg border border-primary-blue/40 flex items-center justify-center">
|
||||
<div className="h-5 w-5 bg-primary-blue/60 rounded"></div>
|
||||
{/* Companion App Header - Enhanced */}
|
||||
<motion.div variants={{ hidden: { opacity: 0, y: -10 }, visible: { opacity: 1, y: 0 } }}>
|
||||
<div className="flex items-center gap-2.5 md:gap-3 lg:gap-4 mb-3 md:mb-4 lg:mb-5">
|
||||
<div className="h-10 w-10 md:h-12 md:w-12 lg:h-14 lg:w-14 bg-primary-blue/20 rounded-lg border-2 border-primary-blue/40 flex items-center justify-center shadow-lg">
|
||||
<div className="h-6 w-6 md:h-7 md:w-7 lg:h-8 lg:w-8 bg-primary-blue/60 rounded"></div>
|
||||
</div>
|
||||
<div>
|
||||
<div className="text-sm font-semibold text-white">GridPilot Companion</div>
|
||||
<div className="text-xs text-white/50">Session Creator</div>
|
||||
<div className="text-base md:text-lg lg:text-xl font-semibold text-white">GridPilot Companion</div>
|
||||
<div className="text-xs md:text-sm lg:text-base text-white/50">Automated Session Creator</div>
|
||||
</div>
|
||||
</div>
|
||||
</motion.div>
|
||||
|
||||
{/* Configuration Card */}
|
||||
<motion.div
|
||||
variants={itemVariants}
|
||||
className="bg-iron-gray rounded-lg p-4 border border-charcoal-outline"
|
||||
>
|
||||
<div className="flex items-center justify-between mb-3">
|
||||
<div className="text-xs text-white/60">Session Template</div>
|
||||
<div className="h-5 w-20 bg-performance-green/30 rounded-full flex items-center justify-center">
|
||||
<div className="text-xs text-performance-green">Ready</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="space-y-2">
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="h-2 w-2 bg-primary-blue rounded-full"></div>
|
||||
<div className="h-2 w-32 bg-white/10 rounded"></div>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="h-2 w-2 bg-primary-blue rounded-full"></div>
|
||||
<div className="h-2 w-28 bg-white/10 rounded"></div>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="h-2 w-2 bg-primary-blue rounded-full"></div>
|
||||
<div className="h-2 w-36 bg-white/10 rounded"></div>
|
||||
</div>
|
||||
</div>
|
||||
</motion.div>
|
||||
|
||||
{/* Browser Automation Visual */}
|
||||
<motion.div
|
||||
variants={itemVariants}
|
||||
className="relative bg-charcoal-outline rounded-lg p-4 border border-primary-blue/30 overflow-hidden"
|
||||
{/* Browser Automation Visual - Full workflow */}
|
||||
<motion.div
|
||||
variants={{ hidden: { opacity: 0, y: 10 }, visible: { opacity: 1, y: 0 } }}
|
||||
className="relative bg-charcoal-outline rounded-lg p-3 md:p-4 lg:p-5 border-2 border-primary-blue/40 overflow-hidden"
|
||||
>
|
||||
{/* Browser Window Mockup */}
|
||||
<div className="space-y-3">
|
||||
<div className="flex items-center gap-2 pb-3 border-b border-white/10">
|
||||
<div className="h-2 w-2 bg-white/20 rounded-full"></div>
|
||||
<div className="h-2 w-2 bg-white/20 rounded-full"></div>
|
||||
<div className="h-2 w-2 bg-white/20 rounded-full"></div>
|
||||
<div className="flex-1 h-2 bg-white/5 rounded ml-2"></div>
|
||||
<div className="space-y-3 md:space-y-4">
|
||||
<div className="flex items-center gap-2 md:gap-2.5 pb-3 md:pb-4 border-b border-white/10">
|
||||
<div className="h-2.5 md:h-3 w-2.5 md:w-3 bg-red-500/60 rounded-full"></div>
|
||||
<div className="h-2.5 md:h-3 w-2.5 md:w-3 bg-warning-amber/60 rounded-full"></div>
|
||||
<div className="h-2.5 md:h-3 w-2.5 md:w-3 bg-performance-green/60 rounded-full"></div>
|
||||
<div className="flex-1 h-2.5 md:h-3 bg-white/5 rounded ml-2 px-2 flex items-center">
|
||||
<div className="text-[8px] md:text-[9px] text-white/30 font-mono">members.iracing.com</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Automation Steps */}
|
||||
<div className="space-y-2">
|
||||
{[1, 2, 3, 4].map((step, index) => (
|
||||
{/* Automation Steps - More detailed */}
|
||||
<div className="space-y-3 md:space-y-4">
|
||||
{[
|
||||
{ label: 'Open iRacing', status: 'Complete', detail: 'Browser ready' },
|
||||
{ label: 'Navigate to Hosted', status: 'Complete', detail: 'Page loaded' },
|
||||
{ label: 'Create Session', status: 'Running', detail: 'Filling form...' },
|
||||
{ label: 'Configure Settings', status: 'Pending', detail: 'Waiting...' }
|
||||
].map((step, index) => (
|
||||
<motion.div
|
||||
key={step}
|
||||
className="flex items-center gap-2"
|
||||
key={index}
|
||||
className="space-y-2"
|
||||
initial={{ opacity: 0, x: -10 }}
|
||||
animate={{
|
||||
opacity: 1,
|
||||
animate={{
|
||||
opacity: 1,
|
||||
x: 0,
|
||||
transition: { delay: shouldReduceMotion ? 0 : 0.5 + (index * 0.15) }
|
||||
transition: { delay: shouldReduceMotion ? 0 : 0.4 + (index * 0.15) }
|
||||
}}
|
||||
>
|
||||
<motion.div
|
||||
className="h-3 w-3 bg-performance-green/40 rounded-full flex items-center justify-center"
|
||||
animate={shouldReduceMotion ? {} : {
|
||||
scale: index === 3 ? [1, 1.2, 1] : 1,
|
||||
opacity: index === 3 ? [0.4, 1, 0.4] : 1
|
||||
}}
|
||||
transition={{ duration: 1.5, repeat: Infinity }}
|
||||
>
|
||||
<div className="h-1.5 w-1.5 bg-performance-green rounded-full"></div>
|
||||
</motion.div>
|
||||
<div className="h-2 w-full bg-white/5 rounded"></div>
|
||||
<div className="flex items-center gap-2.5 md:gap-3">
|
||||
<motion.div
|
||||
className={`h-7 w-7 md:h-8 md:w-8 lg:h-9 lg:w-9 rounded-full flex items-center justify-center flex-shrink-0 border-2 ${
|
||||
step.status === 'Complete'
|
||||
? 'bg-performance-green/40 border-performance-green/60'
|
||||
: step.status === 'Running'
|
||||
? 'bg-primary-blue/40 border-primary-blue/60'
|
||||
: 'bg-charcoal-outline border-white/20'
|
||||
}`}
|
||||
animate={shouldReduceMotion ? {} : step.status === 'Running' ? {
|
||||
scale: [1, 1.15, 1],
|
||||
opacity: [0.4, 1, 0.4]
|
||||
} : {}}
|
||||
transition={{ duration: 1.5, repeat: Infinity }}
|
||||
>
|
||||
{step.status === 'Complete' && (
|
||||
<svg className="h-4 w-4 md:h-5 md:w-5 text-performance-green" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={3} d="M5 13l4 4L19 7" />
|
||||
</svg>
|
||||
)}
|
||||
{step.status === 'Running' && (
|
||||
<div className="h-3 w-3 md:h-4 md:w-4 bg-primary-blue rounded-full"></div>
|
||||
)}
|
||||
{step.status === 'Pending' && (
|
||||
<div className="h-2 w-2 md:h-2.5 md:w-2.5 bg-white/30 rounded-full"></div>
|
||||
)}
|
||||
</motion.div>
|
||||
<div className="flex-1">
|
||||
<div className="text-sm md:text-base lg:text-lg text-white font-medium">{step.label}</div>
|
||||
<div className="text-[10px] md:text-xs lg:text-sm text-white/50">{step.detail}</div>
|
||||
</div>
|
||||
</div>
|
||||
{step.status !== 'Pending' && (
|
||||
<div className="h-2.5 md:h-3 w-full bg-white/5 rounded-full overflow-hidden ml-9 md:ml-10 lg:ml-11">
|
||||
<motion.div
|
||||
className={`h-full ${step.status === 'Complete' ? 'bg-performance-green/60' : 'bg-primary-blue/60'}`}
|
||||
initial={{ width: '0%' }}
|
||||
animate={{ width: step.status === 'Complete' ? '100%' : '65%' }}
|
||||
transition={{ duration: 2, ease: 'easeInOut' }}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</motion.div>
|
||||
))}
|
||||
</div>
|
||||
@@ -112,34 +173,34 @@ export default function CompanionAutomationMockup() {
|
||||
|
||||
{/* Automation Running Indicator */}
|
||||
<motion.div
|
||||
className="absolute top-2 right-2 flex items-center gap-2 bg-deep-graphite/80 backdrop-blur-sm px-3 py-1.5 rounded-full border border-primary-blue/30"
|
||||
className="absolute top-3 right-3 flex items-center gap-2 bg-deep-graphite/90 backdrop-blur-sm px-3 py-2 rounded-full border-2 border-primary-blue/40"
|
||||
animate={shouldReduceMotion ? {} : {
|
||||
boxShadow: [
|
||||
'0 0 8px rgba(25,140,255,0.2)',
|
||||
'0 0 16px rgba(25,140,255,0.4)',
|
||||
'0 0 8px rgba(25,140,255,0.2)'
|
||||
'0 0 12px rgba(25,140,255,0.3)',
|
||||
'0 0 20px rgba(25,140,255,0.5)',
|
||||
'0 0 12px rgba(25,140,255,0.3)'
|
||||
]
|
||||
}}
|
||||
transition={{ duration: 2, repeat: Infinity }}
|
||||
>
|
||||
<motion.div
|
||||
className="h-2 w-2 bg-primary-blue rounded-full"
|
||||
className="h-2.5 w-2.5 md:h-3 md:w-3 bg-primary-blue rounded-full"
|
||||
animate={shouldReduceMotion ? {} : {
|
||||
opacity: [1, 0.5, 1]
|
||||
}}
|
||||
transition={{ duration: 1.5, repeat: Infinity }}
|
||||
/>
|
||||
<div className="text-xs text-primary-blue">Running</div>
|
||||
<div className="text-xs md:text-sm text-primary-blue font-medium">Running</div>
|
||||
</motion.div>
|
||||
</motion.div>
|
||||
|
||||
{/* One-Click Action */}
|
||||
<motion.div
|
||||
variants={itemVariants}
|
||||
className="flex items-center justify-center"
|
||||
{/* One-Click Action - Enhanced */}
|
||||
<motion.div
|
||||
variants={{ hidden: { opacity: 0, y: 10 }, visible: { opacity: 1, y: 0 } }}
|
||||
className="flex flex-col items-center gap-2 md:gap-3"
|
||||
>
|
||||
<motion.div
|
||||
className="bg-primary-blue/20 text-primary-blue px-6 py-2.5 rounded-lg border border-primary-blue/40 text-sm font-semibold"
|
||||
className="bg-primary-blue/20 text-primary-blue px-8 py-4 rounded-lg border-2 border-primary-blue/40 text-base md:text-lg font-semibold cursor-pointer"
|
||||
whileHover={shouldReduceMotion ? {} : {
|
||||
scale: 1.03,
|
||||
boxShadow: '0 4px 24px rgba(25,140,255,0.3)',
|
||||
@@ -148,6 +209,7 @@ export default function CompanionAutomationMockup() {
|
||||
>
|
||||
Create Session
|
||||
</motion.div>
|
||||
<div className="text-[10px] md:text-xs text-white/40">One click. All fields automated.</div>
|
||||
</motion.div>
|
||||
</motion.div>
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
'use client';
|
||||
|
||||
import { motion, useReducedMotion, useMotionValue, useSpring, useTransform } from 'framer-motion';
|
||||
import { useEffect } from 'react';
|
||||
import { useEffect, useState } from 'react';
|
||||
|
||||
export default function DriverProfileMockup() {
|
||||
const shouldReduceMotion = useReducedMotion();
|
||||
const [isMobile, setIsMobile] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
setIsMobile(window.innerWidth < 768);
|
||||
}, []);
|
||||
|
||||
const stats = [
|
||||
{ label: 'Wins', value: 24 },
|
||||
@@ -16,6 +21,69 @@ export default function DriverProfileMockup() {
|
||||
|
||||
const formData = [85, 72, 68, 91, 88, 95, 88, 79, 82, 91];
|
||||
|
||||
if (isMobile) {
|
||||
return (
|
||||
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg p-3 overflow-hidden">
|
||||
<div className="space-y-4">
|
||||
<div>
|
||||
<div className="flex items-center justify-between mb-2">
|
||||
<div className="flex items-center gap-3">
|
||||
<div className="relative h-12 w-12 rounded-full border-2 border-primary-blue/50 overflow-hidden bg-charcoal-outline">
|
||||
<div className="absolute inset-0 flex items-center justify-center text-2xl">🏎️</div>
|
||||
</div>
|
||||
<div>
|
||||
<div className="text-base font-bold text-white">Driver Profile</div>
|
||||
<div className="text-xs text-white/50">Cross-league</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="text-2xl font-bold text-charcoal-outline">#33</div>
|
||||
</div>
|
||||
|
||||
<div className="relative h-2 bg-charcoal-outline rounded-full overflow-hidden mb-1">
|
||||
<div
|
||||
className="absolute inset-y-0 left-0 bg-gradient-to-r from-primary-blue to-neon-aqua rounded-full"
|
||||
style={{ width: '86%' }}
|
||||
/>
|
||||
</div>
|
||||
<div className="flex justify-end">
|
||||
<span className="text-xs text-gray-400">2150 GP Rating</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div className="text-sm font-semibold text-white mb-2">Career Stats</div>
|
||||
<div className="grid grid-cols-3 gap-2">
|
||||
{stats.slice(0, 3).map((stat) => (
|
||||
<div
|
||||
key={stat.label}
|
||||
className="bg-iron-gray/50 border border-charcoal-outline rounded-lg p-2 text-center"
|
||||
>
|
||||
<div className="text-base font-bold text-white font-mono">
|
||||
{stat.value}{stat.suffix}
|
||||
</div>
|
||||
<div className="text-xs text-gray-400 mt-0.5">{stat.label}</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div className="text-sm font-semibold text-white mb-2">Recent Form</div>
|
||||
<div className="h-16 bg-iron-gray/30 border border-charcoal-outline rounded-lg p-2 flex items-end gap-1">
|
||||
{formData.slice(-6).map((value, i) => (
|
||||
<div
|
||||
key={i}
|
||||
className="flex-1 bg-gradient-to-t from-performance-green to-primary-blue rounded-sm"
|
||||
style={{ height: `${value}%` }}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
const containerVariants = {
|
||||
hidden: { opacity: 0 },
|
||||
visible: {
|
||||
@@ -34,28 +102,33 @@ export default function DriverProfileMockup() {
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg p-6 md:p-8 overflow-hidden">
|
||||
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg p-1.5 sm:p-3 md:p-5 lg:p-8 overflow-hidden">
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: shouldReduceMotion ? 0 : -10 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
className="mb-6"
|
||||
className="mb-1.5 sm:mb-3 md:mb-4 lg:mb-6"
|
||||
>
|
||||
<div className="flex items-center justify-between mb-4">
|
||||
<div>
|
||||
<div className="h-6 w-48 bg-white/10 rounded mb-2"></div>
|
||||
<div className="h-4 w-24 bg-white/5 rounded"></div>
|
||||
<div className="flex items-center justify-between mb-1.5 sm:mb-2 md:mb-3 lg:mb-4">
|
||||
<div className="flex items-center gap-1.5 sm:gap-2 md:gap-3 lg:gap-4">
|
||||
<div className="relative h-8 w-8 sm:h-10 sm:w-10 md:h-12 md:w-12 lg:h-16 lg:w-16 rounded-full border-2 border-primary-blue/50 overflow-hidden bg-charcoal-outline">
|
||||
<div className="absolute inset-0 flex items-center justify-center text-base sm:text-xl md:text-2xl lg:text-3xl">🏎️</div>
|
||||
</div>
|
||||
<div>
|
||||
<div className="text-sm sm:text-base md:text-lg lg:text-xl font-bold text-white mb-1 sm:mb-1.5 md:mb-2">Driver Profile</div>
|
||||
<div className="text-[8px] sm:text-[10px] md:text-xs text-white/50">Cross-league racing identity</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="text-4xl font-bold text-charcoal-outline">#33</div>
|
||||
<div className="text-xl sm:text-2xl md:text-3xl lg:text-4xl font-bold text-charcoal-outline">#33</div>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center gap-4 mb-2">
|
||||
<div className="text-xs text-gray-400">GridPilot Rating:</div>
|
||||
<div className="flex flex-wrap items-center gap-1 sm:gap-2 md:gap-3 lg:gap-4 mb-1 sm:mb-1.5 md:mb-2">
|
||||
<div className="text-[8px] sm:text-[10px] md:text-xs text-gray-400">GridPilot Rating:</div>
|
||||
<AnimatedRating shouldReduceMotion={shouldReduceMotion ?? false} value={2150} />
|
||||
<div className="text-xs text-gray-400 ml-4">iRating:</div>
|
||||
<div className="text-[8px] sm:text-[10px] md:text-xs text-gray-400">iRating:</div>
|
||||
<AnimatedRating shouldReduceMotion={shouldReduceMotion ?? false} value={3200} />
|
||||
</div>
|
||||
|
||||
<div className="relative h-3 bg-charcoal-outline rounded-full overflow-hidden">
|
||||
<div className="relative h-1.5 sm:h-2 md:h-2.5 lg:h-3 bg-charcoal-outline rounded-full overflow-hidden">
|
||||
<motion.div
|
||||
className="absolute inset-y-0 left-0 bg-gradient-to-r from-primary-blue to-neon-aqua rounded-full"
|
||||
initial={{ width: '0%' }}
|
||||
@@ -64,7 +137,7 @@ export default function DriverProfileMockup() {
|
||||
/>
|
||||
</div>
|
||||
<div className="flex justify-end mt-1">
|
||||
<span className="text-xs text-gray-400">86%</span>
|
||||
<span className="text-[8px] sm:text-[10px] md:text-xs text-gray-400">86%</span>
|
||||
</div>
|
||||
</motion.div>
|
||||
|
||||
@@ -72,16 +145,17 @@ export default function DriverProfileMockup() {
|
||||
variants={containerVariants}
|
||||
initial="hidden"
|
||||
animate="visible"
|
||||
className="mb-6"
|
||||
className="mb-1.5 sm:mb-3 md:mb-4 lg:mb-6"
|
||||
>
|
||||
<div className="h-4 w-32 bg-white/10 rounded mb-3"></div>
|
||||
<div className="text-[9px] sm:text-xs md:text-sm font-semibold text-white mb-1">Career Statistics</div>
|
||||
<div className="text-[8px] sm:text-[10px] md:text-xs text-white/50 mb-1 sm:mb-2 md:mb-3">Aggregated across all leagues</div>
|
||||
|
||||
<div className="grid grid-cols-2 md:grid-cols-5 gap-3">
|
||||
<div className="grid grid-cols-2 md:grid-cols-5 gap-1.5 sm:gap-2 md:gap-3">
|
||||
{stats.map((stat, index) => (
|
||||
<motion.div
|
||||
key={stat.label}
|
||||
variants={itemVariants}
|
||||
className="bg-iron-gray/50 border border-charcoal-outline rounded-lg p-3 text-center"
|
||||
className="bg-iron-gray/50 border border-charcoal-outline rounded-lg p-1.5 sm:p-2 md:p-3 text-center"
|
||||
>
|
||||
<AnimatedCounter
|
||||
value={stat.value}
|
||||
@@ -89,7 +163,7 @@ export default function DriverProfileMockup() {
|
||||
delay={index * 0.1}
|
||||
suffix={stat.suffix}
|
||||
/>
|
||||
<div className="text-xs text-gray-400 mt-1">{stat.label}</div>
|
||||
<div className="text-[8px] sm:text-[10px] md:text-xs text-gray-400 mt-0.5">{stat.label}</div>
|
||||
</motion.div>
|
||||
))}
|
||||
</div>
|
||||
@@ -99,11 +173,12 @@ export default function DriverProfileMockup() {
|
||||
initial={{ opacity: 0, y: shouldReduceMotion ? 0 : 10 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ delay: shouldReduceMotion ? 0 : 0.6 }}
|
||||
className="mb-6"
|
||||
className="mb-1.5 sm:mb-3 md:mb-4 lg:mb-6"
|
||||
>
|
||||
<div className="h-4 w-28 bg-white/10 rounded mb-3"></div>
|
||||
<div className="text-[9px] sm:text-xs md:text-sm font-semibold text-white mb-1">Recent Form</div>
|
||||
<div className="text-[8px] sm:text-[10px] md:text-xs text-white/50 mb-1 sm:mb-2 md:mb-3">Performance trend over last 10 races</div>
|
||||
|
||||
<div className="h-20 bg-iron-gray/30 border border-charcoal-outline rounded-lg p-3 flex items-end gap-1">
|
||||
<div className="h-12 sm:h-16 md:h-20 bg-iron-gray/30 border border-charcoal-outline rounded-lg p-1.5 sm:p-2 md:p-3 flex items-end gap-0.5">
|
||||
{formData.map((value, i) => (
|
||||
<motion.div
|
||||
key={i}
|
||||
@@ -118,7 +193,7 @@ export default function DriverProfileMockup() {
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
<div className="flex justify-between mt-1 text-xs text-gray-500">
|
||||
<div className="flex justify-between mt-0.5 text-[8px] sm:text-[10px] md:text-xs text-gray-500">
|
||||
<span>Last 10 races</span>
|
||||
<span>Recent</span>
|
||||
</div>
|
||||
@@ -129,9 +204,10 @@ export default function DriverProfileMockup() {
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ delay: shouldReduceMotion ? 0 : 0.8 }}
|
||||
>
|
||||
<div className="h-4 w-20 bg-white/10 rounded mb-3"></div>
|
||||
<div className="text-[9px] sm:text-xs md:text-sm font-semibold text-white mb-1">Teams</div>
|
||||
<div className="text-[8px] sm:text-[10px] md:text-xs text-white/50 mb-1 sm:mb-2 md:mb-3">Current and past team memberships</div>
|
||||
|
||||
<div className="space-y-2">
|
||||
<div className="space-y-1 sm:space-y-1.5 md:space-y-2">
|
||||
{[
|
||||
{ team: 'Red Bull Racing', status: 'Current', color: 'primary-blue' },
|
||||
{ team: 'Mercedes AMG', status: '2023', color: 'charcoal-outline' }
|
||||
@@ -141,12 +217,17 @@ export default function DriverProfileMockup() {
|
||||
initial={{ opacity: 0, x: shouldReduceMotion ? 0 : -10 }}
|
||||
animate={{ opacity: 1, x: 0 }}
|
||||
transition={{ delay: shouldReduceMotion ? 0 : 0.9 + i * 0.1 }}
|
||||
className="flex items-center justify-between bg-iron-gray/30 border border-charcoal-outline rounded-lg p-2 text-sm"
|
||||
className="flex items-center justify-between bg-iron-gray/30 border border-charcoal-outline rounded-lg p-1 sm:p-1.5 md:p-2 text-[10px] sm:text-xs md:text-sm"
|
||||
>
|
||||
<div className="h-3 w-32 bg-white/10 rounded"></div>
|
||||
<span className={`text-xs px-2 py-0.5 rounded ${
|
||||
team.status === 'Current'
|
||||
? 'bg-primary-blue/20 text-primary-blue'
|
||||
<div className="flex items-center gap-2 sm:gap-3">
|
||||
<div className="h-5 w-5 sm:h-6 sm:w-6 md:h-8 md:w-8 rounded border border-primary-blue/30 bg-charcoal-outline flex items-center justify-center text-sm sm:text-base md:text-lg">
|
||||
🏁
|
||||
</div>
|
||||
<div className="h-1.5 sm:h-2 md:h-3 w-16 sm:w-20 md:w-32 bg-white/10 rounded"></div>
|
||||
</div>
|
||||
<span className={`text-[8px] sm:text-[10px] md:text-xs px-1 sm:px-1.5 md:px-2 py-0.5 rounded ${
|
||||
team.status === 'Current'
|
||||
? 'bg-primary-blue/20 text-primary-blue'
|
||||
: 'bg-charcoal-outline text-gray-400'
|
||||
}`}>
|
||||
{team.status}
|
||||
@@ -159,7 +240,7 @@ export default function DriverProfileMockup() {
|
||||
initial={{ opacity: 0 }}
|
||||
animate={{ opacity: 1 }}
|
||||
transition={{ delay: shouldReduceMotion ? 0 : 1.2 }}
|
||||
className="mt-4 text-center text-xs text-gray-400"
|
||||
className="mt-2 sm:mt-3 md:mt-4 text-center text-[8px] sm:text-[10px] md:text-xs text-gray-400"
|
||||
>
|
||||
Active in 3 leagues
|
||||
</motion.div>
|
||||
@@ -183,7 +264,7 @@ function AnimatedRating({ shouldReduceMotion, value }: { shouldReduceMotion: boo
|
||||
}, [shouldReduceMotion, count, value]);
|
||||
|
||||
return (
|
||||
<motion.span className="text-lg font-bold text-primary-blue font-mono">
|
||||
<motion.span className="text-sm sm:text-base md:text-lg font-bold text-primary-blue font-mono">
|
||||
{shouldReduceMotion ? value : <motion.span>{rounded}</motion.span>}
|
||||
</motion.span>
|
||||
);
|
||||
@@ -213,7 +294,7 @@ function AnimatedCounter({
|
||||
}, [shouldReduceMotion, count, value, delay]);
|
||||
|
||||
return (
|
||||
<div className="text-xl font-bold text-white font-mono">
|
||||
<div className="text-sm sm:text-base md:text-lg lg:text-xl font-bold text-white font-mono">
|
||||
{shouldReduceMotion ? value : <motion.span>{rounded}</motion.span>}{suffix}
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
'use client';
|
||||
|
||||
import { motion, useReducedMotion } from 'framer-motion';
|
||||
import { useState } from 'react';
|
||||
import { useState, useEffect } from 'react';
|
||||
|
||||
export default function LeagueDiscoveryMockup() {
|
||||
const shouldReduceMotion = useReducedMotion();
|
||||
const [hoveredIndex, setHoveredIndex] = useState<number | null>(null);
|
||||
const [isMobile, setIsMobile] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
setIsMobile(window.innerWidth < 768);
|
||||
}, []);
|
||||
|
||||
const leagues = [
|
||||
{
|
||||
@@ -30,6 +35,81 @@ export default function LeagueDiscoveryMockup() {
|
||||
}
|
||||
];
|
||||
|
||||
if (isMobile) {
|
||||
return (
|
||||
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg p-3 overflow-hidden">
|
||||
<div className="mb-3">
|
||||
<div className="h-4 w-40 bg-white/10 rounded mb-3"></div>
|
||||
<div className="flex gap-2 flex-wrap">
|
||||
{['Game', 'Region'].map((filter) => (
|
||||
<div
|
||||
key={filter}
|
||||
className="h-6 px-3 bg-charcoal-outline border border-primary-blue/30 rounded-full flex items-center"
|
||||
>
|
||||
<div className="h-1.5 w-10 bg-white/10 rounded"></div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="space-y-3">
|
||||
{leagues.map((league) => (
|
||||
<div
|
||||
key={league.name}
|
||||
className="bg-iron-gray/80 border border-charcoal-outline rounded-lg p-3"
|
||||
>
|
||||
<div className="flex items-start justify-between mb-2">
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="h-10 w-10 rounded-lg border-2 border-primary-blue/30 bg-charcoal-outline flex items-center justify-center text-xl">
|
||||
{league.icon}
|
||||
</div>
|
||||
<div>
|
||||
<div className="h-3 w-32 bg-white/10 rounded mb-1"></div>
|
||||
<div className="flex gap-1 text-xs">
|
||||
<span className="px-1.5 py-0.5 bg-primary-blue/20 text-primary-blue rounded">
|
||||
{league.carClass}
|
||||
</span>
|
||||
<span className="px-1.5 py-0.5 bg-neon-aqua/20 text-neon-aqua rounded">
|
||||
{league.region}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center justify-between text-xs text-gray-400 mb-2">
|
||||
<div className="flex items-center gap-2">
|
||||
<span>{league.drivers} drivers</span>
|
||||
<span>•</span>
|
||||
<span>{league.schedule}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="flex items-center gap-1">
|
||||
{[...Array(5)].map((_, i) => (
|
||||
<svg
|
||||
key={i}
|
||||
className={`w-3 h-3 ${i < Math.floor(league.rating) ? 'text-warning-amber' : 'text-charcoal-outline'}`}
|
||||
fill="currentColor"
|
||||
viewBox="0 0 20 20"
|
||||
>
|
||||
<path d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" />
|
||||
</svg>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<button className="px-2 py-1 bg-primary-blue text-white text-xs rounded">
|
||||
Join
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
const containerVariants = {
|
||||
hidden: { opacity: 0 },
|
||||
visible: {
|
||||
@@ -48,24 +128,24 @@ export default function LeagueDiscoveryMockup() {
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg p-6 md:p-8 overflow-hidden">
|
||||
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg p-1.5 sm:p-3 md:p-5 lg:p-8 overflow-hidden">
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: shouldReduceMotion ? 0 : -10 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
className="mb-6"
|
||||
className="mb-1.5 sm:mb-3 md:mb-4 lg:mb-6"
|
||||
>
|
||||
<div className="h-6 w-52 bg-white/10 rounded mb-4"></div>
|
||||
<div className="h-3 sm:h-4 md:h-5 lg:h-6 w-32 sm:w-40 md:w-52 bg-white/10 rounded mb-1.5 sm:mb-2 md:mb-3 lg:mb-4"></div>
|
||||
|
||||
<div className="flex gap-2 flex-wrap">
|
||||
<div className="flex gap-1 sm:gap-1.5 md:gap-2 flex-wrap">
|
||||
{['Game', 'Region', 'Skill'].map((filter, i) => (
|
||||
<motion.div
|
||||
key={filter}
|
||||
initial={{ opacity: 0, scale: shouldReduceMotion ? 1 : 0.9 }}
|
||||
animate={{ opacity: 1, scale: 1 }}
|
||||
transition={{ delay: shouldReduceMotion ? 0 : i * 0.1 }}
|
||||
className="h-8 px-4 bg-charcoal-outline border border-primary-blue/30 rounded-full flex items-center"
|
||||
className="h-5 sm:h-6 md:h-7 lg:h-8 px-2 sm:px-3 md:px-4 bg-charcoal-outline border border-primary-blue/30 rounded-full flex items-center"
|
||||
>
|
||||
<div className="h-2 w-12 bg-white/10 rounded"></div>
|
||||
<div className="h-1 sm:h-1.5 md:h-2 w-8 sm:w-10 md:w-12 bg-white/10 rounded"></div>
|
||||
</motion.div>
|
||||
))}
|
||||
</div>
|
||||
@@ -75,7 +155,7 @@ export default function LeagueDiscoveryMockup() {
|
||||
variants={containerVariants}
|
||||
initial="hidden"
|
||||
animate="visible"
|
||||
className="space-y-4"
|
||||
className="space-y-1.5 sm:space-y-2 md:space-y-3 lg:space-y-4"
|
||||
>
|
||||
{leagues.map((league, index) => (
|
||||
<motion.div
|
||||
@@ -88,21 +168,23 @@ export default function LeagueDiscoveryMockup() {
|
||||
y: -4,
|
||||
transition: { duration: 0.2 }
|
||||
}}
|
||||
className="bg-iron-gray/80 border border-charcoal-outline rounded-lg p-4 backdrop-blur-sm"
|
||||
className="bg-iron-gray/80 border border-charcoal-outline rounded-lg p-1.5 sm:p-2 md:p-3 lg:p-4 backdrop-blur-sm"
|
||||
>
|
||||
<div className="flex items-start justify-between mb-3">
|
||||
<div className="flex items-center gap-3">
|
||||
<div className="text-2xl">{league.icon}</div>
|
||||
<div className="flex items-start justify-between mb-1.5 sm:mb-2 md:mb-3">
|
||||
<div className="flex items-center gap-1.5 sm:gap-2 md:gap-3">
|
||||
<div className="h-7 w-7 sm:h-8 sm:w-8 md:h-10 md:w-10 lg:h-12 lg:w-12 rounded-lg border-2 border-primary-blue/30 bg-charcoal-outline flex items-center justify-center text-base sm:text-lg md:text-xl lg:text-2xl shadow-[0_0_12px_rgba(25,140,255,0.2)]">
|
||||
{league.icon}
|
||||
</div>
|
||||
<div>
|
||||
<div className="h-4 w-40 bg-white/10 rounded mb-2"></div>
|
||||
<div className="flex gap-2 text-xs">
|
||||
<span className="px-2 py-0.5 bg-primary-blue/20 text-primary-blue rounded">
|
||||
<div className="h-2.5 sm:h-3 md:h-4 w-28 sm:w-32 md:w-40 bg-white/10 rounded mb-1 sm:mb-1.5 md:mb-2"></div>
|
||||
<div className="flex gap-1 sm:gap-1.5 md:gap-2 text-[8px] sm:text-[10px] md:text-xs">
|
||||
<span className="px-1 sm:px-1.5 md:px-2 py-0.5 bg-primary-blue/20 text-primary-blue rounded">
|
||||
{league.carClass}
|
||||
</span>
|
||||
<span className="px-2 py-0.5 bg-neon-aqua/20 text-neon-aqua rounded">
|
||||
<span className="px-1 sm:px-1.5 md:px-2 py-0.5 bg-neon-aqua/20 text-neon-aqua rounded">
|
||||
{league.region}
|
||||
</span>
|
||||
<span className="px-2 py-0.5 bg-charcoal-outline text-gray-400 rounded">
|
||||
<span className="px-1 sm:px-1.5 md:px-2 py-0.5 bg-charcoal-outline text-gray-400 rounded">
|
||||
{league.skill}
|
||||
</span>
|
||||
</div>
|
||||
@@ -110,16 +192,16 @@ export default function LeagueDiscoveryMockup() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center justify-between text-xs text-gray-400 mb-3">
|
||||
<div className="flex items-center gap-4">
|
||||
<div className="flex items-center justify-between text-[8px] sm:text-[10px] md:text-xs text-gray-400 mb-1.5 sm:mb-2 md:mb-3">
|
||||
<div className="flex items-center gap-1.5 sm:gap-2 md:gap-3 lg:gap-4">
|
||||
<div className="flex items-center gap-1">
|
||||
<svg className="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<svg className="w-2.5 h-2.5 sm:w-3 sm:h-3 md:w-4 md:h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z" />
|
||||
</svg>
|
||||
<span>{league.drivers} drivers</span>
|
||||
</div>
|
||||
<div className="flex items-center gap-1">
|
||||
<svg className="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<svg className="w-2.5 h-2.5 sm:w-3 sm:h-3 md:w-4 md:h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" />
|
||||
</svg>
|
||||
<span>{league.schedule}</span>
|
||||
@@ -132,7 +214,7 @@ export default function LeagueDiscoveryMockup() {
|
||||
{[...Array(5)].map((_, i) => (
|
||||
<motion.svg
|
||||
key={i}
|
||||
className={`w-4 h-4 ${i < Math.floor(league.rating) ? 'text-warning-amber' : 'text-charcoal-outline'}`}
|
||||
className={`w-2.5 h-2.5 sm:w-3 sm:h-3 md:w-4 md:h-4 ${i < Math.floor(league.rating) ? 'text-warning-amber' : 'text-charcoal-outline'}`}
|
||||
fill="currentColor"
|
||||
viewBox="0 0 20 20"
|
||||
animate={hoveredIndex === index && !shouldReduceMotion ? {
|
||||
@@ -143,21 +225,21 @@ export default function LeagueDiscoveryMockup() {
|
||||
<path d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" />
|
||||
</motion.svg>
|
||||
))}
|
||||
<span className="text-xs text-gray-400 ml-1">{league.rating}</span>
|
||||
<span className="text-[8px] sm:text-[10px] md:text-xs text-gray-400 ml-1">{league.rating}</span>
|
||||
</div>
|
||||
|
||||
<div className="flex gap-2">
|
||||
<div className="flex gap-1 sm:gap-1.5 md:gap-2">
|
||||
<motion.button
|
||||
whileHover={shouldReduceMotion ? {} : { scale: 1.05 }}
|
||||
whileTap={shouldReduceMotion ? {} : { scale: 0.95 }}
|
||||
className="px-3 py-1 bg-primary-blue text-white text-xs rounded hover:bg-primary-blue/80 transition-colors"
|
||||
className="px-1.5 sm:px-2 md:px-3 py-0.5 bg-primary-blue text-white text-[8px] sm:text-[10px] md:text-xs rounded hover:bg-primary-blue/80 transition-colors"
|
||||
>
|
||||
Join
|
||||
</motion.button>
|
||||
<motion.button
|
||||
whileHover={shouldReduceMotion ? {} : { scale: 1.05 }}
|
||||
whileTap={shouldReduceMotion ? {} : { scale: 0.95 }}
|
||||
className="px-3 py-1 bg-charcoal-outline text-gray-300 text-xs rounded hover:bg-charcoal-outline/80 transition-colors"
|
||||
className="px-1.5 sm:px-2 md:px-3 py-0.5 bg-charcoal-outline text-gray-300 text-[8px] sm:text-[10px] md:text-xs rounded hover:bg-charcoal-outline/80 transition-colors"
|
||||
>
|
||||
View
|
||||
</motion.button>
|
||||
|
||||
@@ -1,9 +1,63 @@
|
||||
'use client';
|
||||
|
||||
import { motion, useReducedMotion } from 'framer-motion';
|
||||
import { useState, useEffect } from 'react';
|
||||
|
||||
export default function LeagueHomeMockup() {
|
||||
const shouldReduceMotion = useReducedMotion();
|
||||
const [isMobile, setIsMobile] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
setIsMobile(window.innerWidth < 768);
|
||||
}, []);
|
||||
|
||||
if (isMobile) {
|
||||
return (
|
||||
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg p-3 overflow-hidden">
|
||||
<div className="space-y-4">
|
||||
<div className="flex items-center gap-3 mb-2">
|
||||
<div className="h-12 w-12 rounded-lg border-2 border-primary-blue/50 bg-charcoal-outline flex items-center justify-center text-2xl shadow-[0_0_20px_rgba(25,140,255,0.3)]">
|
||||
🏆
|
||||
</div>
|
||||
<div>
|
||||
<div className="text-base font-bold text-white">Super GT</div>
|
||||
<div className="text-xs text-gray-400">Round 8/12</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div className="text-sm font-semibold text-white mb-3">Next Race</div>
|
||||
<div className="relative flex items-center gap-3 bg-iron-gray rounded-lg p-3 border border-charcoal-outline">
|
||||
<div className="h-8 w-8 bg-charcoal-outline rounded border border-primary-blue/20 flex items-center justify-center text-base">
|
||||
🏁
|
||||
</div>
|
||||
<div className="flex-1">
|
||||
<div className="h-2.5 w-28 bg-white/10 rounded mb-2"></div>
|
||||
<div className="h-2 w-20 bg-white/5 rounded"></div>
|
||||
</div>
|
||||
<div className="w-2 h-2 bg-primary-blue rounded-full shadow-glow"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div className="text-sm font-semibold text-white mb-3">Latest Result</div>
|
||||
<div className="bg-iron-gray rounded-lg p-3 border border-charcoal-outline">
|
||||
<div className="flex items-center gap-3 py-2 border-b border-charcoal-outline">
|
||||
<div className="h-2.5 w-6 bg-white/10 rounded"></div>
|
||||
<div className="h-2.5 flex-1 bg-white/10 rounded"></div>
|
||||
<div className="h-2.5 w-10 bg-white/10 rounded"></div>
|
||||
</div>
|
||||
<div className="flex items-center gap-3 py-2">
|
||||
<div className="h-2 w-6 bg-white/5 rounded"></div>
|
||||
<div className="h-2 flex-1 bg-white/5 rounded"></div>
|
||||
<div className="h-2 w-10 bg-performance-green/20 rounded"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
const containerVariants = {
|
||||
hidden: { opacity: 0 },
|
||||
@@ -19,25 +73,34 @@ export default function LeagueHomeMockup() {
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg p-8 overflow-hidden">
|
||||
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg p-1.5 sm:p-3 md:p-5 lg:p-8 overflow-hidden">
|
||||
<motion.div
|
||||
variants={containerVariants}
|
||||
initial="hidden"
|
||||
animate="visible"
|
||||
className="space-y-6"
|
||||
className="space-y-1.5 sm:space-y-3 md:space-y-4 lg:space-y-6"
|
||||
>
|
||||
<motion.div variants={itemVariants}>
|
||||
<div className="text-xl font-bold text-white mb-2">Super GT Championship</div>
|
||||
<div className="text-sm text-gray-400">Season 3 • Round 8/12</div>
|
||||
<div className="flex items-center gap-1.5 sm:gap-2 md:gap-3 lg:gap-4 mb-1 sm:mb-1.5 md:mb-2">
|
||||
<div className="h-8 w-8 sm:h-10 sm:w-10 md:h-12 md:w-12 lg:h-16 lg:w-16 rounded-lg border-2 border-primary-blue/50 bg-charcoal-outline flex items-center justify-center text-base sm:text-xl md:text-2xl lg:text-3xl shadow-[0_0_20px_rgba(25,140,255,0.3)]">
|
||||
🏆
|
||||
</div>
|
||||
<div>
|
||||
<div className="text-sm sm:text-base md:text-lg lg:text-xl font-bold text-white mb-0.5">Super GT Championship</div>
|
||||
<div className="text-[9px] sm:text-xs md:text-sm text-gray-400">Season 3 • Round 8/12</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="text-[8px] sm:text-[10px] md:text-xs text-white/50 mt-1 sm:mt-1.5 md:mt-2">Your league's dedicated home page</div>
|
||||
</motion.div>
|
||||
|
||||
<motion.div variants={itemVariants}>
|
||||
<div className="text-base font-semibold text-white mb-4">Upcoming Races</div>
|
||||
<div className="space-y-3">
|
||||
<div className="text-[10px] sm:text-sm md:text-base font-semibold text-white mb-1.5 sm:mb-2 md:mb-3 lg:mb-4">Upcoming Races</div>
|
||||
<div className="text-[8px] sm:text-[10px] md:text-xs text-white/50 mb-1.5 sm:mb-2 md:mb-3">Calendar automatically synced from iRacing</div>
|
||||
<div className="space-y-1.5 sm:space-y-2 md:space-y-3">
|
||||
{[1, 2, 3].map((i) => (
|
||||
<motion.div
|
||||
key={i}
|
||||
className="relative flex items-center gap-4 bg-iron-gray rounded-lg p-4 border border-charcoal-outline shadow-[inset_0_1px_2px_rgba(0,0,0,0.2)]"
|
||||
className="relative flex items-center gap-1.5 sm:gap-2 md:gap-3 lg:gap-4 bg-iron-gray rounded-lg p-1.5 sm:p-2 md:p-3 lg:p-4 border border-charcoal-outline shadow-[inset_0_1px_2px_rgba(0,0,0,0.2)]"
|
||||
whileHover={shouldReduceMotion ? {} : {
|
||||
y: -2,
|
||||
boxShadow: '0 4px 24px rgba(0,0,0,0.4), 0 0 20px rgba(25,140,255,0.3)',
|
||||
@@ -45,10 +108,12 @@ export default function LeagueHomeMockup() {
|
||||
}}
|
||||
transition={{ type: 'spring', stiffness: 200, damping: 20 }}
|
||||
>
|
||||
<div className="h-10 w-10 bg-charcoal-outline rounded border border-primary-blue/20"></div>
|
||||
<div className="h-6 w-6 sm:h-7 sm:w-7 md:h-8 md:w-8 lg:h-10 lg:w-10 bg-charcoal-outline rounded border border-primary-blue/20 flex items-center justify-center text-sm sm:text-base md:text-lg lg:text-xl">
|
||||
🏁
|
||||
</div>
|
||||
<div className="flex-1">
|
||||
<div className="h-3 w-32 bg-white/10 rounded mb-2"></div>
|
||||
<div className="h-2.5 w-24 bg-white/5 rounded font-mono"></div>
|
||||
<div className="h-1.5 sm:h-2 md:h-2.5 lg:h-3 w-20 sm:w-24 md:w-28 lg:w-32 bg-white/10 rounded mb-1 sm:mb-1.5 md:mb-2"></div>
|
||||
<div className="h-1 sm:h-1.5 md:h-2 lg:h-2.5 w-12 sm:w-16 md:w-20 lg:w-24 bg-white/5 rounded font-mono"></div>
|
||||
</div>
|
||||
{i === 1 && (
|
||||
<motion.div
|
||||
@@ -63,7 +128,7 @@ export default function LeagueHomeMockup() {
|
||||
}}
|
||||
transition={{ duration: 2, repeat: Infinity }}
|
||||
>
|
||||
<div className="w-3 h-3 bg-primary-blue rounded-full shadow-glow"></div>
|
||||
<div className="w-1.5 h-1.5 sm:w-2 sm:h-2 md:w-2.5 md:h-2.5 lg:w-3 lg:h-3 bg-primary-blue rounded-full shadow-glow"></div>
|
||||
</motion.div>
|
||||
)}
|
||||
</motion.div>
|
||||
@@ -72,18 +137,19 @@ export default function LeagueHomeMockup() {
|
||||
</motion.div>
|
||||
|
||||
<motion.div variants={itemVariants}>
|
||||
<div className="text-base font-semibold text-white mb-4">Recent Results</div>
|
||||
<div className="bg-iron-gray rounded-lg p-4 border border-charcoal-outline shadow-[0_4px_24px_rgba(0,0,0,0.4)]">
|
||||
<div className="flex items-center gap-3 mb-3 pb-3 border-b border-charcoal-outline">
|
||||
<div className="h-2.5 w-8 bg-white/10 rounded font-mono"></div>
|
||||
<div className="h-2.5 flex-1 bg-white/10 rounded"></div>
|
||||
<div className="h-2.5 w-12 bg-white/10 rounded font-mono"></div>
|
||||
<div className="text-[10px] sm:text-sm md:text-base font-semibold text-white mb-1.5 sm:mb-2 md:mb-3 lg:mb-4">Recent Results</div>
|
||||
<div className="text-[8px] sm:text-[10px] md:text-xs text-white/50 mb-1.5 sm:mb-2 md:mb-3">Results appear instantly after each race</div>
|
||||
<div className="bg-iron-gray rounded-lg p-1.5 sm:p-2 md:p-3 lg:p-4 border border-charcoal-outline shadow-[0_4px_24px_rgba(0,0,0,0.4)]">
|
||||
<div className="flex items-center gap-1.5 sm:gap-2 md:gap-3 mb-1.5 sm:mb-2 md:mb-3 pb-1.5 sm:pb-2 md:pb-3 border-b border-charcoal-outline">
|
||||
<div className="h-1.5 sm:h-2 md:h-2.5 w-5 sm:w-6 md:w-8 bg-white/10 rounded font-mono"></div>
|
||||
<div className="h-1.5 sm:h-2 md:h-2.5 flex-1 bg-white/10 rounded"></div>
|
||||
<div className="h-1.5 sm:h-2 md:h-2.5 w-8 sm:w-10 md:w-12 bg-white/10 rounded font-mono"></div>
|
||||
</div>
|
||||
{[1, 2].map((i) => (
|
||||
<div key={i} className="flex items-center gap-3 py-2">
|
||||
<div className="h-2.5 w-8 bg-white/5 rounded font-mono"></div>
|
||||
<div className="h-2.5 flex-1 bg-white/5 rounded"></div>
|
||||
<div className="h-2.5 w-12 bg-performance-green/20 rounded text-center font-mono text-performance-green"></div>
|
||||
<div key={i} className="flex items-center gap-1.5 sm:gap-2 md:gap-3 py-1 sm:py-1.5 md:py-2">
|
||||
<div className="h-1.5 sm:h-2 md:h-2.5 w-5 sm:w-6 md:w-8 bg-white/5 rounded font-mono"></div>
|
||||
<div className="h-1.5 sm:h-2 md:h-2.5 flex-1 bg-white/5 rounded"></div>
|
||||
<div className="h-1.5 sm:h-2 md:h-2.5 w-8 sm:w-10 md:w-12 bg-performance-green/20 rounded text-center font-mono text-performance-green"></div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
'use client';
|
||||
|
||||
import { motion, useReducedMotion } from 'framer-motion';
|
||||
import { useState } from 'react';
|
||||
import { useState, useEffect } from 'react';
|
||||
|
||||
export default function ProtestWorkflowMockup() {
|
||||
const shouldReduceMotion = useReducedMotion();
|
||||
const [activeStep, setActiveStep] = useState<number>(1);
|
||||
const [isMobile, setIsMobile] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
setIsMobile(window.innerWidth < 768);
|
||||
}, []);
|
||||
|
||||
const steps = [
|
||||
{
|
||||
@@ -28,6 +33,50 @@ export default function ProtestWorkflowMockup() {
|
||||
},
|
||||
];
|
||||
|
||||
const getStatusColor = (status: string) => {
|
||||
switch (status) {
|
||||
case 'pending': return 'bg-charcoal-outline border-charcoal-outline text-gray-500';
|
||||
case 'active': return 'bg-warning-amber/20 border-warning-amber text-warning-amber';
|
||||
case 'resolved': return 'bg-performance-green/20 border-performance-green text-performance-green';
|
||||
default: return 'bg-charcoal-outline border-charcoal-outline text-gray-500';
|
||||
}
|
||||
};
|
||||
|
||||
if (isMobile) {
|
||||
return (
|
||||
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg overflow-hidden p-3 flex flex-col justify-center gap-4">
|
||||
<div className="flex items-center justify-center gap-3">
|
||||
{steps.map((step, i) => (
|
||||
<div key={step.name} className="flex items-center">
|
||||
<div className="flex flex-col items-center">
|
||||
<div
|
||||
className={`w-10 h-10 rounded-lg flex items-center justify-center mb-1 border-2 ${getStatusColor(step.status)}`}
|
||||
>
|
||||
<svg className="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d={step.icon} />
|
||||
</svg>
|
||||
</div>
|
||||
<div className="text-xs text-white/70 text-center">{step.name}</div>
|
||||
</div>
|
||||
{i < steps.length - 1 && (
|
||||
<svg className="w-4 h-4 mx-1" viewBox="0 0 24 24" fill="none">
|
||||
<path d="M5 12h14m-7-7l7 7-7 7" stroke="#43C9E6" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
||||
</svg>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<div className="relative h-1 bg-charcoal-outline rounded-full overflow-hidden">
|
||||
<div
|
||||
className="absolute inset-y-0 left-0 bg-gradient-to-r from-neon-aqua to-primary-blue rounded-full"
|
||||
style={{ width: `${((activeStep + 1) / steps.length) * 100}%` }}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
const stepVariants = {
|
||||
hidden: { opacity: 0, scale: shouldReduceMotion ? 1 : 0.8 },
|
||||
visible: (i: number) => ({
|
||||
@@ -55,18 +104,9 @@ export default function ProtestWorkflowMockup() {
|
||||
})
|
||||
};
|
||||
|
||||
const getStatusColor = (status: string) => {
|
||||
switch (status) {
|
||||
case 'pending': return 'bg-charcoal-outline border-charcoal-outline text-gray-500';
|
||||
case 'active': return 'bg-warning-amber/20 border-warning-amber text-warning-amber';
|
||||
case 'resolved': return 'bg-performance-green/20 border-performance-green text-performance-green';
|
||||
default: return 'bg-charcoal-outline border-charcoal-outline text-gray-500';
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg overflow-hidden p-6 flex flex-col justify-center">
|
||||
<div className="flex flex-col md:flex-row items-center justify-center gap-4 mb-4">
|
||||
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg overflow-hidden p-1.5 sm:p-3 md:p-5 lg:p-8 flex flex-col justify-center gap-2 sm:gap-4 md:gap-6 lg:gap-8">
|
||||
<div className="flex flex-col md:flex-row items-center justify-center gap-2 sm:gap-3 md:gap-4">
|
||||
{steps.map((step, i) => (
|
||||
<div key={step.name} className="flex items-center flex-shrink-0">
|
||||
<motion.div
|
||||
@@ -78,7 +118,7 @@ export default function ProtestWorkflowMockup() {
|
||||
onHoverStart={() => !shouldReduceMotion && setActiveStep(i)}
|
||||
>
|
||||
<motion.div
|
||||
className={`relative w-12 h-12 md:w-14 md:h-14 rounded-lg flex items-center justify-center mb-2 border-2 ${getStatusColor(step.status)}`}
|
||||
className={`relative w-8 h-8 sm:w-10 sm:h-10 md:w-12 md:h-12 lg:w-14 lg:h-14 rounded-lg flex items-center justify-center mb-1 sm:mb-1.5 md:mb-2 border-2 ${getStatusColor(step.status)}`}
|
||||
whileHover={shouldReduceMotion ? {} : {
|
||||
scale: 1.1,
|
||||
boxShadow: step.status === 'active'
|
||||
@@ -90,7 +130,7 @@ export default function ProtestWorkflowMockup() {
|
||||
}}
|
||||
transition={{ type: 'spring', stiffness: 300, damping: 15 }}
|
||||
>
|
||||
<svg className="w-6 h-6 md:w-7 md:h-7" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<svg className="w-4 h-4 sm:w-5 sm:h-5 md:w-6 md:h-6 lg:w-7 lg:h-7" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d={step.icon} />
|
||||
</svg>
|
||||
{step.status === 'active' && (
|
||||
@@ -107,9 +147,9 @@ export default function ProtestWorkflowMockup() {
|
||||
/>
|
||||
)}
|
||||
</motion.div>
|
||||
<div className="text-xs text-white/70 text-center mb-1">{step.name}</div>
|
||||
<div className="text-[8px] sm:text-[10px] md:text-xs text-white/70 text-center mb-0.5">{step.name}</div>
|
||||
<motion.div
|
||||
className={`h-1.5 w-10 md:w-12 rounded ${
|
||||
className={`h-0.5 sm:h-1 md:h-1.5 w-6 sm:w-8 md:w-10 lg:w-12 rounded ${
|
||||
step.status === 'pending' ? 'bg-charcoal-outline' :
|
||||
step.status === 'active' ? 'bg-warning-amber/30' :
|
||||
'bg-performance-green/30'
|
||||
@@ -122,8 +162,8 @@ export default function ProtestWorkflowMockup() {
|
||||
</motion.div>
|
||||
|
||||
{i < steps.length - 1 && (
|
||||
<div className="hidden md:block relative ml-1.5">
|
||||
<svg className="w-5 h-5" viewBox="0 0 24 24" fill="none">
|
||||
<div className="hidden md:block relative ml-1">
|
||||
<svg className="w-3 h-3 sm:w-4 sm:h-4 md:w-5 md:h-5" viewBox="0 0 24 24" fill="none">
|
||||
<path d="M5 12h14m-7-7l7 7-7 7" stroke="#43C9E6" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
||||
</svg>
|
||||
</div>
|
||||
@@ -136,7 +176,7 @@ export default function ProtestWorkflowMockup() {
|
||||
initial={{ opacity: 0, scaleX: 0 }}
|
||||
animate={{ opacity: 1, scaleX: 1 }}
|
||||
transition={{ delay: shouldReduceMotion ? 0 : 0.8, duration: 0.6 }}
|
||||
className="relative h-1 bg-charcoal-outline rounded-full overflow-hidden"
|
||||
className="relative h-0.5 sm:h-0.5 md:h-1 bg-charcoal-outline rounded-full overflow-hidden"
|
||||
>
|
||||
<motion.div
|
||||
className="absolute inset-y-0 left-0 bg-gradient-to-r from-neon-aqua to-primary-blue rounded-full"
|
||||
|
||||
@@ -1,130 +1,204 @@
|
||||
'use client';
|
||||
|
||||
import { motion, useReducedMotion } from 'framer-motion';
|
||||
import { useState, useEffect } from 'react';
|
||||
|
||||
export default function RaceHistoryMockup() {
|
||||
const shouldReduceMotion = useReducedMotion();
|
||||
const [isMobile, setIsMobile] = useState(false);
|
||||
|
||||
const containerVariants = {
|
||||
hidden: { opacity: 0 },
|
||||
visible: {
|
||||
opacity: 1,
|
||||
transition: { staggerChildren: shouldReduceMotion ? 0 : 0.15 }
|
||||
}
|
||||
useEffect(() => {
|
||||
const checkMobile = () => setIsMobile(window.innerWidth < 768);
|
||||
checkMobile();
|
||||
window.addEventListener('resize', checkMobile);
|
||||
return () => window.removeEventListener('resize', checkMobile);
|
||||
}, []);
|
||||
|
||||
const itemVariants = {
|
||||
hidden: { opacity: 0, scale: shouldReduceMotion ? 1 : 0.95 },
|
||||
visible: { opacity: 1, scale: 1 }
|
||||
};
|
||||
|
||||
const raceCardVariants = {
|
||||
hidden: { opacity: 0, x: shouldReduceMotion ? 0 : -20 },
|
||||
visible: { opacity: 1, x: 0 }
|
||||
};
|
||||
// Simple, elegant mobile version - just the core story
|
||||
if (isMobile) {
|
||||
return (
|
||||
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite to-iron-gray rounded-lg p-4 overflow-hidden flex items-center justify-center">
|
||||
<motion.div
|
||||
initial="hidden"
|
||||
animate="visible"
|
||||
variants={{
|
||||
visible: { transition: { staggerChildren: 0.12 } }
|
||||
}}
|
||||
className="space-y-4 w-full max-w-xs"
|
||||
>
|
||||
{/* Race result - clean and simple */}
|
||||
<motion.div variants={itemVariants}>
|
||||
<div className="bg-iron-gray/60 rounded-xl p-4 border-2 border-primary-blue/40">
|
||||
<div className="flex items-center gap-3">
|
||||
<div className="h-14 w-14 bg-primary-blue/20 rounded-lg flex items-center justify-center flex-shrink-0">
|
||||
<span className="text-2xl font-bold text-primary-blue">P3</span>
|
||||
</div>
|
||||
<div>
|
||||
<div className="text-base font-semibold text-white">Watkins Glen</div>
|
||||
<div className="text-xs text-white/60">GT3 Sprint</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</motion.div>
|
||||
|
||||
const profileSectionVariants = {
|
||||
hidden: { opacity: 0, x: shouldReduceMotion ? 0 : 20 },
|
||||
visible: {
|
||||
opacity: 1,
|
||||
x: 0,
|
||||
transition: { delay: shouldReduceMotion ? 0 : 0.2 }
|
||||
}
|
||||
};
|
||||
{/* Simple arrow */}
|
||||
<motion.div variants={itemVariants} className="flex justify-center">
|
||||
<div className="text-primary-blue text-2xl">↓</div>
|
||||
</motion.div>
|
||||
|
||||
const connectionLineVariants = {
|
||||
hidden: { scaleX: 0, opacity: 0 },
|
||||
visible: {
|
||||
scaleX: 1,
|
||||
opacity: 0.3,
|
||||
transition: { duration: 0.6 }
|
||||
}
|
||||
};
|
||||
{/* Updates - minimal */}
|
||||
<motion.div variants={itemVariants}>
|
||||
<div className="bg-iron-gray/40 rounded-xl p-3 border border-charcoal-outline space-y-2">
|
||||
<div className="text-xs text-white/70 text-center mb-2">Profile Updated</div>
|
||||
<div className="flex gap-2">
|
||||
<div className="flex-1 bg-deep-graphite/50 rounded py-2 text-center border border-primary-blue/30">
|
||||
<div className="text-xs text-primary-blue font-semibold">Stats ↑</div>
|
||||
</div>
|
||||
<div className="flex-1 bg-deep-graphite/50 rounded py-2 text-center border border-performance-green/30">
|
||||
<div className="text-xs text-performance-green font-semibold">+12</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</motion.div>
|
||||
</motion.div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
// Desktop version - richer with more updates
|
||||
return (
|
||||
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg p-8 overflow-hidden flex items-center justify-center">
|
||||
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg p-1.5 sm:p-3 md:p-5 lg:p-8 overflow-hidden">
|
||||
<motion.div
|
||||
variants={containerVariants}
|
||||
initial="hidden"
|
||||
animate="visible"
|
||||
className="relative w-full max-w-4xl"
|
||||
variants={{
|
||||
visible: { transition: { staggerChildren: shouldReduceMotion ? 0 : 0.12 } }
|
||||
}}
|
||||
className="space-y-2 sm:space-y-3 md:space-y-4 lg:space-y-5"
|
||||
>
|
||||
<div className="grid grid-cols-1 lg:grid-cols-2 gap-8 items-center">
|
||||
{/* Left: Race Result Card */}
|
||||
<motion.div variants={raceCardVariants} className="relative">
|
||||
<div className="bg-iron-gray rounded-lg p-6 border border-primary-blue/40 shadow-[0_0_24px_rgba(25,140,255,0.2)]">
|
||||
<div className="flex items-center gap-4 mb-4">
|
||||
<div className="h-16 w-16 bg-charcoal-outline rounded-lg border border-primary-blue/30 flex items-center justify-center">
|
||||
<div className="text-white text-2xl font-bold">P3</div>
|
||||
</div>
|
||||
<div className="flex-1">
|
||||
<div className="text-lg font-semibold text-white mb-1">Watkins Glen</div>
|
||||
<div className="text-sm text-white/50">GT3 Sprint • Race 8</div>
|
||||
</div>
|
||||
{/* Race Result Card - Enhanced */}
|
||||
<motion.div variants={itemVariants}>
|
||||
<div className="bg-iron-gray rounded-lg p-2 sm:p-3 md:p-4 lg:p-5 border-2 border-primary-blue/40">
|
||||
<div className="flex items-center gap-2 sm:gap-3 md:gap-4">
|
||||
<div className="relative h-12 w-12 sm:h-14 sm:w-14 md:h-16 md:w-16 lg:h-20 lg:w-20 bg-charcoal-outline rounded-lg border-2 border-primary-blue/30 overflow-hidden flex-shrink-0">
|
||||
<div className="absolute inset-0 bg-gradient-to-br from-primary-blue/20 to-performance-green/20"></div>
|
||||
<div className="absolute inset-0 flex items-center justify-center text-white text-xl sm:text-2xl md:text-3xl lg:text-4xl font-bold">P3</div>
|
||||
</div>
|
||||
<div className="space-y-2 pt-4 border-t border-charcoal-outline">
|
||||
<div className="flex justify-between text-sm">
|
||||
<span className="text-white/50">Finish</span>
|
||||
<span className="text-white font-medium">3rd of 24</span>
|
||||
<div className="flex-1 min-w-0">
|
||||
<div className="flex items-center gap-1 sm:gap-1.5 md:gap-2 mb-1">
|
||||
<div className="text-sm sm:text-base md:text-lg">🏁</div>
|
||||
<div className="text-sm sm:text-base md:text-lg lg:text-xl font-semibold text-white truncate">Watkins Glen</div>
|
||||
</div>
|
||||
<div className="flex justify-between text-sm">
|
||||
<span className="text-white/50">Incidents</span>
|
||||
<span className="text-performance-green font-medium">0x</span>
|
||||
<div className="text-xs sm:text-sm md:text-base text-white/60 mb-1">GT3 Sprint Race</div>
|
||||
<div className="flex items-center gap-2 sm:gap-3 md:gap-4 text-[10px] sm:text-xs md:text-sm text-white/50">
|
||||
<span>24 drivers</span>
|
||||
<span>•</span>
|
||||
<span>45 min</span>
|
||||
<span>•</span>
|
||||
<span>Just finished</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</motion.div>
|
||||
</div>
|
||||
</motion.div>
|
||||
|
||||
{/* Connection Arrow */}
|
||||
<motion.div
|
||||
variants={connectionLineVariants}
|
||||
className="hidden lg:block absolute left-1/2 top-1/2 -translate-y-1/2 w-16 h-0.5 bg-gradient-to-r from-primary-blue to-performance-green origin-left"
|
||||
style={{ transformOrigin: 'left center' }}
|
||||
{/* Connection Flow with Animation */}
|
||||
<motion.div variants={itemVariants} className="flex justify-center">
|
||||
<motion.div
|
||||
className="flex flex-col items-center gap-1"
|
||||
animate={shouldReduceMotion ? {} : {
|
||||
y: [0, 5, 0]
|
||||
}}
|
||||
transition={{ duration: 2, repeat: Infinity }}
|
||||
>
|
||||
<div className="absolute right-0 top-1/2 -translate-y-1/2">
|
||||
<div className="w-2 h-2 bg-performance-green rotate-45 transform translate-x-1"></div>
|
||||
</div>
|
||||
<div className="text-primary-blue text-2xl sm:text-3xl md:text-4xl">↓</div>
|
||||
<div className="text-[10px] sm:text-xs text-primary-blue/70">Auto-sync</div>
|
||||
</motion.div>
|
||||
</motion.div>
|
||||
|
||||
{/* Right: Unified Profile Preview */}
|
||||
<motion.div variants={profileSectionVariants} className="relative">
|
||||
<div className="bg-iron-gray/80 backdrop-blur-sm rounded-lg p-6 border border-charcoal-outline space-y-4">
|
||||
<div className="text-sm font-semibold text-white/70 mb-3">Updates Your Profile</div>
|
||||
|
||||
{/* Stats Section */}
|
||||
<div className="space-y-2">
|
||||
<div className="flex items-center justify-between py-2 px-3 bg-deep-graphite/50 rounded border border-primary-blue/20">
|
||||
<span className="text-xs text-white/50">Career Stats</span>
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="h-1.5 w-16 bg-primary-blue/40 rounded"></div>
|
||||
<span className="text-xs text-performance-green">↑</span>
|
||||
</div>
|
||||
{/* Profile Updates Grid - More detailed */}
|
||||
<motion.div variants={itemVariants}>
|
||||
<div className="bg-iron-gray/80 rounded-lg p-2 sm:p-3 md:p-4 lg:p-5 border border-charcoal-outline">
|
||||
<div className="text-xs sm:text-sm md:text-base font-semibold text-white/80 text-center mb-2 sm:mb-3 md:mb-4">
|
||||
Profile Updates
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-2 gap-2 sm:gap-3 md:gap-4">
|
||||
{/* Career Stats Update */}
|
||||
<div className="bg-deep-graphite/50 rounded-lg p-2 sm:p-3 md:p-4 border border-primary-blue/30">
|
||||
<div className="flex items-center justify-between mb-2">
|
||||
<span className="text-[10px] sm:text-xs md:text-sm text-white/70">Career Stats</span>
|
||||
<motion.span
|
||||
className="text-[10px] sm:text-xs md:text-sm text-performance-green font-semibold"
|
||||
animate={shouldReduceMotion ? {} : { scale: [1, 1.2, 1] }}
|
||||
transition={{ duration: 0.5, delay: 0.5 }}
|
||||
>
|
||||
↑
|
||||
</motion.span>
|
||||
</div>
|
||||
|
||||
{/* Team Points */}
|
||||
<div className="flex items-center justify-between py-2 px-3 bg-deep-graphite/50 rounded border border-performance-green/20">
|
||||
<span className="text-xs text-white/50">Team Points</span>
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="h-1.5 w-12 bg-performance-green/40 rounded"></div>
|
||||
<span className="text-xs text-performance-green">+18</span>
|
||||
</div>
|
||||
<div className="text-[9px] sm:text-[10px] md:text-xs text-white/50">
|
||||
Wins: 24 → 25
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Rating */}
|
||||
<div className="flex items-center justify-between py-2 px-3 bg-deep-graphite/50 rounded border border-subtle-neon-aqua/20">
|
||||
<span className="text-xs text-white/50">Rating</span>
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="h-1.5 w-10 bg-subtle-neon-aqua/40 rounded"></div>
|
||||
<span className="text-xs text-performance-green">+12</span>
|
||||
</div>
|
||||
{/* Rating Update */}
|
||||
<div className="bg-deep-graphite/50 rounded-lg p-2 sm:p-3 md:p-4 border border-performance-green/30">
|
||||
<div className="flex items-center justify-between mb-2">
|
||||
<span className="text-[10px] sm:text-xs md:text-sm text-white/70">Rating</span>
|
||||
<motion.span
|
||||
className="text-[10px] sm:text-xs md:text-sm text-performance-green font-semibold font-mono"
|
||||
animate={shouldReduceMotion ? {} : { scale: [1, 1.2, 1] }}
|
||||
transition={{ duration: 0.5, delay: 0.6 }}
|
||||
>
|
||||
+12
|
||||
</motion.span>
|
||||
</div>
|
||||
<div className="text-[9px] sm:text-[10px] md:text-xs text-white/50">
|
||||
1342 → 1354
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Season History */}
|
||||
<div className="flex items-center justify-between py-2 px-3 bg-deep-graphite/50 rounded border border-white/10">
|
||||
<span className="text-xs text-white/50">Season Record</span>
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="h-1.5 w-14 bg-white/20 rounded"></div>
|
||||
</div>
|
||||
{/* Season Points Update */}
|
||||
<div className="bg-deep-graphite/50 rounded-lg p-2 sm:p-3 md:p-4 border border-warning-amber/30">
|
||||
<div className="flex items-center justify-between mb-2">
|
||||
<span className="text-[10px] sm:text-xs md:text-sm text-white/70">Season</span>
|
||||
<motion.span
|
||||
className="text-[10px] sm:text-xs md:text-sm text-warning-amber font-semibold font-mono"
|
||||
animate={shouldReduceMotion ? {} : { scale: [1, 1.2, 1] }}
|
||||
transition={{ duration: 0.5, delay: 0.7 }}
|
||||
>
|
||||
+18
|
||||
</motion.span>
|
||||
</div>
|
||||
<div className="text-[9px] sm:text-[10px] md:text-xs text-white/50">
|
||||
248 → 266 pts
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Team Points Update */}
|
||||
<div className="bg-deep-graphite/50 rounded-lg p-2 sm:p-3 md:p-4 border border-neon-aqua/30">
|
||||
<div className="flex items-center justify-between mb-2">
|
||||
<span className="text-[10px] sm:text-xs md:text-sm text-white/70">Team</span>
|
||||
<motion.span
|
||||
className="text-[10px] sm:text-xs md:text-sm text-neon-aqua font-semibold font-mono"
|
||||
animate={shouldReduceMotion ? {} : { scale: [1, 1.2, 1] }}
|
||||
transition={{ duration: 0.5, delay: 0.8 }}
|
||||
>
|
||||
+18
|
||||
</motion.span>
|
||||
</div>
|
||||
<div className="text-[9px] sm:text-[10px] md:text-xs text-white/50">
|
||||
Contributing
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</motion.div>
|
||||
</div>
|
||||
</div>
|
||||
</motion.div>
|
||||
</motion.div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -6,6 +6,11 @@ import { useEffect, useState } from 'react';
|
||||
export default function RatingFactorsMockup() {
|
||||
const shouldReduceMotion = useReducedMotion();
|
||||
const [isHovered, setIsHovered] = useState<number | null>(null);
|
||||
const [isMobile, setIsMobile] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
setIsMobile(window.innerWidth < 768);
|
||||
}, []);
|
||||
|
||||
const factors = [
|
||||
{ name: 'Position', value: 85, color: 'text-primary-blue', bgColor: 'bg-primary-blue' },
|
||||
@@ -16,6 +21,43 @@ export default function RatingFactorsMockup() {
|
||||
{ name: 'Team Points', value: 79, color: 'text-performance-green', bgColor: 'bg-performance-green' },
|
||||
];
|
||||
|
||||
if (isMobile) {
|
||||
return (
|
||||
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg p-3 overflow-hidden">
|
||||
<div className="text-center mb-4">
|
||||
<div className="h-5 w-40 bg-white/10 rounded mx-auto mb-2"></div>
|
||||
<div className="h-3 w-32 bg-white/5 rounded mx-auto"></div>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-2 gap-3 mb-4">
|
||||
{factors.slice(0, 4).map((factor) => (
|
||||
<div key={factor.name} className="w-full">
|
||||
<div className="flex items-center justify-between mb-2">
|
||||
<div className="text-xs text-gray-400">{factor.name}</div>
|
||||
<span className={`text-sm font-semibold font-mono ${factor.color}`}>
|
||||
{factor.value}
|
||||
</span>
|
||||
</div>
|
||||
<div className="relative h-2.5 bg-charcoal-outline rounded-full overflow-hidden">
|
||||
<div
|
||||
className={`absolute inset-y-0 left-0 ${factor.bgColor} rounded-full`}
|
||||
style={{ width: `${factor.value}%` }}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<div className="flex items-center justify-center bg-iron-gray/50 rounded-lg p-3 border border-charcoal-outline">
|
||||
<div className="text-center">
|
||||
<div className="h-2.5 w-20 bg-white/10 rounded mb-2 mx-auto"></div>
|
||||
<div className="text-3xl font-bold text-primary-blue font-mono">1342</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
const containerVariants = {
|
||||
hidden: { opacity: 0 },
|
||||
visible: {
|
||||
@@ -34,21 +76,21 @@ export default function RatingFactorsMockup() {
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg p-8 overflow-hidden">
|
||||
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg p-3 md:p-4 lg:p-6 overflow-hidden">
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: shouldReduceMotion ? 0 : -10 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
className="text-center mb-6"
|
||||
className="text-center mb-3 md:mb-4 lg:mb-6"
|
||||
>
|
||||
<div className="h-7 w-56 bg-white/10 rounded mx-auto mb-3"></div>
|
||||
<div className="h-4 w-40 bg-white/5 rounded mx-auto"></div>
|
||||
<div className="h-6 md:h-6 lg:h-7 w-44 md:w-56 bg-white/10 rounded mx-auto mb-2.5 md:mb-3"></div>
|
||||
<div className="h-4 md:h-4 w-32 md:w-40 bg-white/5 rounded mx-auto"></div>
|
||||
</motion.div>
|
||||
|
||||
<motion.div
|
||||
variants={containerVariants}
|
||||
initial="hidden"
|
||||
animate="visible"
|
||||
className="grid grid-cols-3 gap-4 mb-6 max-w-4xl mx-auto"
|
||||
className="grid grid-cols-2 md:grid-cols-3 gap-3 md:gap-4 mb-3 md:mb-4 lg:mb-6 max-w-4xl mx-auto"
|
||||
>
|
||||
{factors.map((factor, index) => (
|
||||
<motion.div
|
||||
@@ -74,11 +116,11 @@ export default function RatingFactorsMockup() {
|
||||
initial={{ opacity: 0, y: shouldReduceMotion ? 0 : 20 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ delay: shouldReduceMotion ? 0 : 0.6 }}
|
||||
className="flex items-center justify-center gap-3 bg-iron-gray/50 rounded-lg p-5 border border-charcoal-outline shadow-[0_4px_24px_rgba(0,0,0,0.4)] backdrop-blur-sm max-w-md mx-auto"
|
||||
className="flex items-center justify-center gap-3 md:gap-3 bg-iron-gray/50 rounded-lg p-4 md:p-4 lg:p-5 border border-charcoal-outline shadow-[0_4px_24px_rgba(0,0,0,0.4)] backdrop-blur-sm max-w-md mx-auto"
|
||||
>
|
||||
<div className="text-center">
|
||||
<div className="h-3 w-28 bg-white/10 rounded mb-2 mx-auto"></div>
|
||||
<div className="h-12 w-24 bg-charcoal-outline rounded flex items-center justify-center border border-primary-blue/30">
|
||||
<div className="h-3 md:h-3 w-24 md:w-28 bg-white/10 rounded mb-2 md:mb-2 mx-auto"></div>
|
||||
<div className="h-12 md:h-12 w-24 md:w-24 bg-charcoal-outline rounded flex items-center justify-center border border-primary-blue/30">
|
||||
<AnimatedRating shouldReduceMotion={shouldReduceMotion ?? false} />
|
||||
</div>
|
||||
</div>
|
||||
@@ -121,16 +163,16 @@ function RatingFactor({
|
||||
whileHover={shouldReduceMotion ? {} : { scale: 1.05 }}
|
||||
transition={{ type: 'spring', stiffness: 300, damping: 20 }}
|
||||
>
|
||||
<div className="flex items-center justify-between mb-2">
|
||||
<div className="text-xs font-light text-gray-400 tracking-wide">{name}</div>
|
||||
<div className="flex items-center justify-between mb-2.5 md:mb-3">
|
||||
<div className="text-sm md:text-base lg:text-lg font-light text-gray-400 tracking-wide">{name}</div>
|
||||
<motion.span
|
||||
className={`text-sm font-semibold font-mono ${color}`}
|
||||
className={`text-sm md:text-base font-semibold font-mono ${color}`}
|
||||
animate={isHovered && !shouldReduceMotion ? { scale: 1.1 } : { scale: 1 }}
|
||||
>
|
||||
{value}
|
||||
</motion.span>
|
||||
</div>
|
||||
<div className="relative h-2 bg-charcoal-outline rounded-full overflow-hidden">
|
||||
<div className="relative h-3 md:h-3.5 lg:h-4 bg-charcoal-outline rounded-full overflow-hidden">
|
||||
<motion.div
|
||||
className={`absolute inset-y-0 left-0 ${bgColor} rounded-full`}
|
||||
style={{ width }}
|
||||
@@ -158,7 +200,7 @@ function AnimatedRating({ shouldReduceMotion }: { shouldReduceMotion: boolean })
|
||||
}, [shouldReduceMotion, count]);
|
||||
|
||||
return (
|
||||
<motion.span className="text-3xl font-bold text-primary-blue font-mono">
|
||||
<motion.span className="text-3xl md:text-4xl lg:text-5xl font-bold text-primary-blue font-mono">
|
||||
{shouldReduceMotion ? 1342 : <motion.span>{rounded}</motion.span>}
|
||||
</motion.span>
|
||||
);
|
||||
|
||||
@@ -1,84 +1,128 @@
|
||||
'use client';
|
||||
|
||||
import { useState, useEffect } from 'react';
|
||||
|
||||
export default function SimPlatformMockup() {
|
||||
return (
|
||||
<div className="relative w-full max-w-3xl mx-auto">
|
||||
<div className="bg-iron-gray border border-charcoal-outline rounded-lg p-6 shadow-2xl">
|
||||
<div className="space-y-4">
|
||||
<div className="flex items-center justify-between pb-4 border-b border-charcoal-outline">
|
||||
<div className="text-sm font-semibold text-slate-300">Platform Support</div>
|
||||
<div className="text-xs text-slate-500">Active: 1 | Planned: 3</div>
|
||||
const [isMobile, setIsMobile] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
const checkMobile = () => setIsMobile(window.innerWidth < 768);
|
||||
checkMobile();
|
||||
window.addEventListener('resize', checkMobile);
|
||||
return () => window.removeEventListener('resize', checkMobile);
|
||||
}, []);
|
||||
|
||||
// Simple mobile version - just the essence of cross-platform
|
||||
if (isMobile) {
|
||||
return (
|
||||
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite to-iron-gray rounded-lg p-4 overflow-hidden flex items-center justify-center">
|
||||
<div className="space-y-3 w-full">
|
||||
{/* Active Platform - Clean */}
|
||||
<div className="bg-iron-gray/60 border-2 border-primary-blue rounded-xl p-4 relative">
|
||||
<div className="absolute top-3 right-3">
|
||||
<div className="w-2 h-2 rounded-full bg-performance-green animate-pulse" />
|
||||
</div>
|
||||
<div className="flex items-center gap-3">
|
||||
<div className="w-12 h-12 rounded-lg bg-primary-blue/20 flex items-center justify-center flex-shrink-0">
|
||||
<span className="text-2xl font-bold text-primary-blue">iR</span>
|
||||
</div>
|
||||
<div>
|
||||
<div className="text-base font-semibold text-white">iRacing</div>
|
||||
<div className="text-xs text-performance-green">Active</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-2 gap-3">
|
||||
{/* Simple "more coming" indicator */}
|
||||
<div className="bg-iron-gray/30 rounded-xl p-3 border border-charcoal-outline/50">
|
||||
<div className="text-xs text-center text-slate-500">More platforms coming</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
// Desktop version
|
||||
return (
|
||||
<div className="relative w-full max-w-3xl mx-auto">
|
||||
<div className="bg-iron-gray border border-charcoal-outline rounded-lg p-1.5 sm:p-3 md:p-4 lg:p-6 shadow-2xl">
|
||||
<div className="space-y-1.5 sm:space-y-2 md:space-y-3 lg:space-y-4">
|
||||
<div className="flex items-center justify-between pb-1.5 sm:pb-2 md:pb-3 lg:pb-4 border-b border-charcoal-outline">
|
||||
<div className="text-[9px] sm:text-xs md:text-sm font-semibold text-slate-300">Platform Support</div>
|
||||
<div className="text-[8px] sm:text-[10px] md:text-xs text-slate-500">Active: 1 | Planned: 3</div>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-1.5 sm:gap-2 md:gap-3">
|
||||
{/* iRacing - Active */}
|
||||
<div className="bg-deep-graphite border-2 border-primary-blue rounded-lg p-4 relative overflow-hidden">
|
||||
<div className="absolute top-2 right-2">
|
||||
<div className="w-2 h-2 rounded-full bg-performance-green animate-pulse" />
|
||||
<div className="bg-deep-graphite border-2 border-primary-blue rounded-lg p-1.5 sm:p-2 md:p-3 lg:p-4 relative overflow-hidden">
|
||||
<div className="absolute top-1 sm:top-1.5 md:top-2 right-1 sm:right-1.5 md:right-2">
|
||||
<div className="w-1 sm:w-1.5 md:w-2 h-1 sm:h-1.5 md:h-2 rounded-full bg-performance-green animate-pulse" />
|
||||
</div>
|
||||
<div className="flex items-center gap-3">
|
||||
<div className="w-12 h-12 rounded bg-primary-blue/10 flex items-center justify-center">
|
||||
<span className="text-2xl font-bold text-primary-blue">iR</span>
|
||||
<div className="flex items-center gap-1.5 sm:gap-2 md:gap-3">
|
||||
<div className="w-8 h-8 sm:w-10 sm:h-10 md:w-12 md:h-12 rounded bg-primary-blue/10 flex items-center justify-center">
|
||||
<span className="text-base sm:text-xl md:text-2xl font-bold text-primary-blue">iR</span>
|
||||
</div>
|
||||
<div>
|
||||
<div className="font-semibold text-white">iRacing</div>
|
||||
<div className="text-xs text-performance-green">Active</div>
|
||||
<div className="text-xs sm:text-sm md:text-base font-semibold text-white">iRacing</div>
|
||||
<div className="text-[8px] sm:text-[10px] md:text-xs text-performance-green">Active</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="mt-3 text-xs text-slate-400">
|
||||
<div className="mt-1.5 sm:mt-2 md:mt-3 text-[8px] sm:text-[10px] md:text-xs text-slate-400">
|
||||
Full integration
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* ACC - Future */}
|
||||
<div className="bg-deep-graphite border border-charcoal-outline rounded-lg p-4 opacity-40">
|
||||
<div className="flex items-center gap-3">
|
||||
<div className="w-12 h-12 rounded bg-slate-700/20 flex items-center justify-center">
|
||||
<span className="text-2xl font-bold text-slate-600">AC</span>
|
||||
<div className="bg-deep-graphite border border-charcoal-outline rounded-lg p-1.5 sm:p-2 md:p-3 lg:p-4 opacity-40">
|
||||
<div className="flex items-center gap-1.5 sm:gap-2 md:gap-3">
|
||||
<div className="w-8 h-8 sm:w-10 sm:h-10 md:w-12 md:h-12 rounded bg-slate-700/20 flex items-center justify-center">
|
||||
<span className="text-base sm:text-xl md:text-2xl font-bold text-slate-600">AC</span>
|
||||
</div>
|
||||
<div>
|
||||
<div className="font-semibold text-slate-500">ACC</div>
|
||||
<div className="text-xs text-slate-600">Planned</div>
|
||||
<div className="text-xs sm:text-sm font-semibold text-slate-500">ACC</div>
|
||||
<div className="text-[9px] sm:text-xs text-slate-600">Planned</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="mt-3 text-xs text-slate-600">
|
||||
<div className="mt-1.5 sm:mt-2 md:mt-3 text-[8px] sm:text-[10px] md:text-xs text-slate-600">
|
||||
Coming later
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* rFactor 2 - Future */}
|
||||
<div className="bg-deep-graphite border border-charcoal-outline rounded-lg p-4 opacity-40">
|
||||
<div className="flex items-center gap-3">
|
||||
<div className="w-12 h-12 rounded bg-slate-700/20 flex items-center justify-center">
|
||||
<span className="text-2xl font-bold text-slate-600">rF</span>
|
||||
<div className="bg-deep-graphite border border-charcoal-outline rounded-lg p-1.5 sm:p-2 md:p-3 lg:p-4 opacity-40">
|
||||
<div className="flex items-center gap-1.5 sm:gap-2 md:gap-3">
|
||||
<div className="w-8 h-8 sm:w-10 sm:h-10 md:w-12 md:h-12 rounded bg-slate-700/20 flex items-center justify-center">
|
||||
<span className="text-base sm:text-xl md:text-2xl font-bold text-slate-600">rF</span>
|
||||
</div>
|
||||
<div>
|
||||
<div className="font-semibold text-slate-500">rFactor 2</div>
|
||||
<div className="text-xs text-slate-600">Planned</div>
|
||||
<div className="text-xs sm:text-sm md:text-base font-semibold text-slate-500">rFactor 2</div>
|
||||
<div className="text-[8px] sm:text-[10px] md:text-xs text-slate-600">Planned</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="mt-3 text-xs text-slate-600">
|
||||
<div className="mt-1.5 sm:mt-2 md:mt-3 text-[8px] sm:text-[10px] md:text-xs text-slate-600">
|
||||
Coming later
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* LMU - Future */}
|
||||
<div className="bg-deep-graphite border border-charcoal-outline rounded-lg p-4 opacity-40">
|
||||
<div className="flex items-center gap-3">
|
||||
<div className="w-12 h-12 rounded bg-slate-700/20 flex items-center justify-center">
|
||||
<span className="text-2xl font-bold text-slate-600">LM</span>
|
||||
<div className="bg-deep-graphite border border-charcoal-outline rounded-lg p-1.5 sm:p-2 md:p-3 lg:p-4 opacity-40">
|
||||
<div className="flex items-center gap-1.5 sm:gap-2 md:gap-3">
|
||||
<div className="w-8 h-8 sm:w-10 sm:h-10 md:w-12 md:h-12 rounded bg-slate-700/20 flex items-center justify-center">
|
||||
<span className="text-base sm:text-xl md:text-2xl font-bold text-slate-600">LM</span>
|
||||
</div>
|
||||
<div>
|
||||
<div className="font-semibold text-slate-500">Le Mans Ult.</div>
|
||||
<div className="text-xs text-slate-600">Planned</div>
|
||||
<div className="text-xs sm:text-sm md:text-base font-semibold text-slate-500">Le Mans Ult.</div>
|
||||
<div className="text-[8px] sm:text-[10px] md:text-xs text-slate-600">Planned</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="mt-3 text-xs text-slate-600">
|
||||
<div className="mt-1.5 sm:mt-2 md:mt-3 text-[8px] sm:text-[10px] md:text-xs text-slate-600">
|
||||
Coming later
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="pt-4 border-t border-charcoal-outline">
|
||||
<div className="text-xs text-slate-500 text-center">
|
||||
<div className="pt-1.5 sm:pt-2 md:pt-3 lg:pt-4 border-t border-charcoal-outline">
|
||||
<div className="text-[8px] sm:text-[10px] md:text-xs text-slate-500 text-center">
|
||||
Your identity stays with you across platforms
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -6,6 +6,69 @@ import { useEffect, useState } from 'react';
|
||||
export default function StandingsTableMockup() {
|
||||
const shouldReduceMotion = useReducedMotion();
|
||||
const [hoveredRow, setHoveredRow] = useState<number | null>(null);
|
||||
const [isMobile, setIsMobile] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
setIsMobile(window.innerWidth < 768);
|
||||
}, []);
|
||||
|
||||
if (isMobile) {
|
||||
return (
|
||||
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg p-3 overflow-hidden">
|
||||
<div className="mb-3">
|
||||
<div className="flex items-center gap-2 pb-2 border-b border-charcoal-outline">
|
||||
<div className="text-xs font-mono text-gray-400">#</div>
|
||||
<div className="text-xs flex-1 font-semibold text-white">Driver</div>
|
||||
<div className="text-xs font-mono text-gray-400">Pts</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="space-y-2">
|
||||
{[1, 2, 3, 4, 5].map((i) => (
|
||||
<div
|
||||
key={i}
|
||||
className={`flex items-center gap-2 py-2 px-2 rounded-lg border ${
|
||||
i <= 3
|
||||
? 'bg-gradient-to-r from-performance-green/10 to-iron-gray border-performance-green/20'
|
||||
: 'bg-iron-gray border-charcoal-outline'
|
||||
}`}
|
||||
>
|
||||
<div
|
||||
className={`h-7 w-7 rounded-full flex items-center justify-center font-semibold text-xs ${
|
||||
i <= 3
|
||||
? 'bg-primary-blue text-white shadow-glow'
|
||||
: 'bg-charcoal-outline text-gray-400'
|
||||
}`}
|
||||
>
|
||||
{i}
|
||||
</div>
|
||||
<div className="flex-1 flex items-center gap-2">
|
||||
<div className="h-5 w-5 rounded-full bg-charcoal-outline border border-primary-blue/20 flex items-center justify-center text-xs">
|
||||
🏎️
|
||||
</div>
|
||||
<div className="h-2.5 w-full max-w-[100px] bg-white/10 rounded"></div>
|
||||
</div>
|
||||
<div className="relative w-16 h-5 bg-charcoal-outline rounded border border-primary-blue/20 overflow-hidden">
|
||||
<div
|
||||
className={`absolute inset-y-0 left-0 ${
|
||||
i <= 3
|
||||
? 'bg-gradient-to-r from-performance-green/40 to-performance-green/20'
|
||||
: 'bg-gradient-to-r from-iron-gray to-charcoal-outline'
|
||||
}`}
|
||||
style={{ width: `${100 - (i - 1) * 15}%` }}
|
||||
/>
|
||||
<div className="relative h-full flex items-center justify-center">
|
||||
<span className="text-xs font-mono font-semibold text-white">
|
||||
{300 - i * 20}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
const getRowAnimation = (i: number) => ({
|
||||
hidden: { opacity: 0, y: shouldReduceMotion ? 0 : 10 },
|
||||
@@ -22,24 +85,28 @@ export default function StandingsTableMockup() {
|
||||
});
|
||||
|
||||
return (
|
||||
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg p-6 overflow-hidden">
|
||||
<div className="mb-4">
|
||||
<div className="flex items-center gap-4 pb-3 border-b border-charcoal-outline">
|
||||
<div className="text-xs font-mono text-gray-400">#</div>
|
||||
<div className="text-xs flex-1 font-semibold text-white">Driver</div>
|
||||
<div className="text-xs font-mono text-gray-400">Wins</div>
|
||||
<div className="text-xs font-mono text-gray-400">Points</div>
|
||||
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg p-1.5 sm:p-3 md:p-4 lg:p-6 overflow-hidden">
|
||||
<div className="mb-1.5 sm:mb-2 md:mb-3 lg:mb-4">
|
||||
<div className="text-[8px] sm:text-[10px] md:text-xs text-white/50 mb-1.5 sm:mb-2 md:mb-3">Real-time standings updated after every race</div>
|
||||
<div className="flex items-center gap-1.5 sm:gap-2 md:gap-3 lg:gap-4 pb-1.5 sm:pb-2 md:pb-3 border-b border-charcoal-outline">
|
||||
<div className="text-[8px] sm:text-[10px] md:text-xs font-mono text-gray-400">#</div>
|
||||
<div className="text-[8px] sm:text-[10px] md:text-xs flex-1 font-semibold text-white">Driver</div>
|
||||
<div className="text-[8px] sm:text-[10px] md:text-xs font-mono text-gray-400 hidden md:block">Wins</div>
|
||||
<div className="text-[8px] sm:text-[10px] md:text-xs font-mono text-gray-400 flex items-center gap-1">
|
||||
<span>Points</span>
|
||||
<span className="text-performance-green text-[8px]">●</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="space-y-1">
|
||||
<div className="space-y-0.5">
|
||||
{[1, 2, 3, 4, 5, 6, 7, 8].map((i) => (
|
||||
<motion.div
|
||||
key={i}
|
||||
variants={getRowAnimation(i)}
|
||||
initial="hidden"
|
||||
animate="visible"
|
||||
className={`relative flex items-center gap-4 py-3 px-3 rounded-lg border transition-all duration-150 ${
|
||||
className={`relative flex items-center gap-1.5 sm:gap-2 md:gap-3 lg:gap-4 py-1.5 sm:py-2 md:py-2.5 lg:py-3 px-1.5 sm:px-2 md:px-3 rounded-lg border transition-all duration-150 ${
|
||||
i <= 3
|
||||
? 'bg-gradient-to-r from-performance-green/10 to-iron-gray border-performance-green/20'
|
||||
: 'bg-iron-gray border-charcoal-outline'
|
||||
@@ -53,7 +120,7 @@ export default function StandingsTableMockup() {
|
||||
}}
|
||||
>
|
||||
<motion.div
|
||||
className={`h-7 w-7 rounded-full flex items-center justify-center font-semibold text-xs ${
|
||||
className={`h-6 w-6 sm:h-7 sm:w-7 rounded-full flex items-center justify-center font-semibold text-[10px] sm:text-xs ${
|
||||
i <= 3
|
||||
? 'bg-primary-blue text-white shadow-glow'
|
||||
: 'bg-charcoal-outline text-gray-400'
|
||||
@@ -66,10 +133,13 @@ export default function StandingsTableMockup() {
|
||||
>
|
||||
{i}
|
||||
</motion.div>
|
||||
<div className="flex-1">
|
||||
<div className="h-3 w-full max-w-[140px] bg-white/10 rounded"></div>
|
||||
<div className="flex-1 flex items-center gap-1 sm:gap-1.5 md:gap-2">
|
||||
<div className="h-4 w-4 sm:h-5 sm:w-5 md:h-6 md:w-6 rounded-full bg-charcoal-outline border border-primary-blue/20 flex items-center justify-center text-[8px] sm:text-[10px] md:text-xs aspect-square">
|
||||
🏎️
|
||||
</div>
|
||||
<div className="h-1.5 sm:h-2 md:h-2.5 lg:h-3 w-full max-w-[80px] sm:max-w-[100px] md:max-w-[140px] bg-white/10 rounded"></div>
|
||||
</div>
|
||||
<div className="h-3 w-16 bg-white/5 rounded font-mono"></div>
|
||||
<div className="h-1.5 sm:h-2 md:h-2.5 lg:h-3 w-10 sm:w-12 md:w-16 bg-white/5 rounded font-mono hidden md:block"></div>
|
||||
<div className="relative">
|
||||
<AnimatedPoints
|
||||
points={300 - i * 20}
|
||||
@@ -107,7 +177,7 @@ function AnimatedPoints({
|
||||
const percentage = (points / 300) * 100;
|
||||
|
||||
return (
|
||||
<div className="relative w-24 h-7 bg-charcoal-outline rounded border border-primary-blue/20 overflow-hidden">
|
||||
<div className="relative w-12 sm:w-16 md:w-20 lg:w-24 h-4 sm:h-5 md:h-6 lg:h-7 bg-charcoal-outline rounded border border-primary-blue/20 overflow-hidden">
|
||||
<motion.div
|
||||
className={`absolute inset-y-0 left-0 ${
|
||||
position <= 3
|
||||
@@ -119,7 +189,7 @@ function AnimatedPoints({
|
||||
transition={{ duration: shouldReduceMotion ? 0 : 0.8, ease: 'easeOut', delay: 0.1 + position * 0.05 }}
|
||||
/>
|
||||
<div className="relative h-full flex items-center justify-center">
|
||||
<motion.span className="text-xs font-mono font-semibold text-white">
|
||||
<motion.span className="text-[8px] sm:text-[10px] md:text-xs font-mono font-semibold text-white">
|
||||
{shouldReduceMotion ? points : <motion.span>{spring}</motion.span>}
|
||||
</motion.span>
|
||||
</div>
|
||||
|
||||
@@ -1,15 +1,98 @@
|
||||
'use client';
|
||||
|
||||
import { motion, useReducedMotion } from 'framer-motion';
|
||||
import { useState } from 'react';
|
||||
import { useState, useEffect } from 'react';
|
||||
|
||||
export default function TeamCompetitionMockup() {
|
||||
const shouldReduceMotion = useReducedMotion();
|
||||
const [hoveredDriver, setHoveredDriver] = useState<number | null>(null);
|
||||
const [hoveredTeam, setHoveredTeam] = useState<number | null>(null);
|
||||
const [isMobile, setIsMobile] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
setIsMobile(window.innerWidth < 768);
|
||||
}, []);
|
||||
|
||||
const teamColors = ['#198CFF', '#6FE37A', '#FFC556', '#43C9E6', '#9333EA'];
|
||||
|
||||
if (isMobile) {
|
||||
return (
|
||||
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg p-3 overflow-hidden">
|
||||
<div className="space-y-4">
|
||||
<div>
|
||||
<div className="text-sm font-semibold text-white mb-3">Drivers</div>
|
||||
<div className="space-y-2">
|
||||
{[1, 2, 3].map((i) => (
|
||||
<div
|
||||
key={i}
|
||||
className="relative flex items-center gap-2 bg-iron-gray rounded-lg p-2 border border-charcoal-outline overflow-hidden"
|
||||
>
|
||||
<div
|
||||
className="absolute left-0 top-0 bottom-0 w-1"
|
||||
style={{ backgroundColor: teamColors[i-1] }}
|
||||
/>
|
||||
<div
|
||||
className="h-5 w-5 rounded-full flex items-center justify-center font-semibold text-xs border-2"
|
||||
style={{
|
||||
borderColor: teamColors[i-1],
|
||||
backgroundColor: `${teamColors[i-1]}20`
|
||||
}}
|
||||
>
|
||||
<span className="text-white">{i}</span>
|
||||
</div>
|
||||
<div className="h-6 w-6 rounded-full flex items-center justify-center text-sm" style={{ backgroundColor: `${teamColors[i-1]}20`, borderWidth: '1px', borderColor: teamColors[i-1] }}>
|
||||
🏎️
|
||||
</div>
|
||||
<div className="flex-1">
|
||||
<div className="h-2.5 w-full bg-white/10 rounded"></div>
|
||||
</div>
|
||||
<div className="h-3 w-10 bg-charcoal-outline rounded text-xs flex items-center justify-center text-white/70"></div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="h-px bg-gradient-to-r from-transparent via-charcoal-outline to-transparent" />
|
||||
|
||||
<div>
|
||||
<div className="text-sm font-semibold text-white mb-3">Constructors</div>
|
||||
<div className="space-y-2">
|
||||
{[1, 2, 3].map((i) => (
|
||||
<div
|
||||
key={i}
|
||||
className="relative flex items-center gap-2 bg-iron-gray rounded-lg p-2 border border-charcoal-outline overflow-hidden"
|
||||
>
|
||||
<div
|
||||
className="absolute left-0 top-0 bottom-0 w-1"
|
||||
style={{ backgroundColor: teamColors[i-1] }}
|
||||
/>
|
||||
<div
|
||||
className="h-6 w-6 rounded flex items-center justify-center text-sm border-2"
|
||||
style={{
|
||||
borderColor: teamColors[i-1],
|
||||
backgroundColor: `${teamColors[i-1]}20`
|
||||
}}
|
||||
>
|
||||
🏁
|
||||
</div>
|
||||
<div className="flex-1">
|
||||
<div className="h-2.5 w-full bg-white/10 rounded mb-1"></div>
|
||||
<div className="relative h-1.5 bg-charcoal-outline rounded-full overflow-hidden">
|
||||
<div
|
||||
className="absolute inset-y-0 left-0 rounded-full"
|
||||
style={{ backgroundColor: teamColors[i-1], width: `${100 - (i-1) * 15}%` }}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
const leftColumnVariants = {
|
||||
hidden: { opacity: 0, x: shouldReduceMotion ? 0 : -20 },
|
||||
visible: {
|
||||
@@ -51,18 +134,18 @@ export default function TeamCompetitionMockup() {
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg p-6 overflow-hidden">
|
||||
<div className="grid grid-cols-2 gap-6 h-full">
|
||||
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg p-1.5 sm:p-3 md:p-4 lg:p-6 overflow-hidden">
|
||||
<div className="grid grid-cols-2 gap-2 sm:gap-3 md:gap-4 lg:gap-6 h-full">
|
||||
<motion.div
|
||||
variants={leftColumnVariants}
|
||||
initial="hidden"
|
||||
animate="visible"
|
||||
className="relative"
|
||||
>
|
||||
<div className="h-5 w-24 bg-white/10 rounded mb-4 text-xs flex items-center justify-center text-white font-semibold">
|
||||
<div className="h-3 sm:h-4 md:h-5 w-16 sm:w-20 md:w-24 bg-white/10 rounded mb-1.5 sm:mb-2 md:mb-3 lg:mb-4 text-[8px] sm:text-[10px] md:text-xs flex items-center justify-center text-white font-semibold">
|
||||
Drivers
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
<div className="space-y-1 sm:space-y-1.5 md:space-y-2">
|
||||
{[1, 2, 3, 4, 5].map((i) => (
|
||||
<motion.div
|
||||
key={i}
|
||||
@@ -70,7 +153,7 @@ export default function TeamCompetitionMockup() {
|
||||
variants={rowVariants}
|
||||
initial="hidden"
|
||||
animate="visible"
|
||||
className="relative flex items-center gap-3 bg-iron-gray rounded-lg p-2.5 border border-charcoal-outline overflow-hidden"
|
||||
className="relative flex items-center gap-1.5 sm:gap-2 md:gap-2.5 lg:gap-3 bg-iron-gray rounded-lg p-1 sm:p-1.5 md:p-2 lg:p-2.5 border border-charcoal-outline overflow-hidden"
|
||||
onHoverStart={() => !shouldReduceMotion && setHoveredDriver(i)}
|
||||
onHoverEnd={() => setHoveredDriver(null)}
|
||||
whileHover={shouldReduceMotion ? {} : {
|
||||
@@ -84,7 +167,7 @@ export default function TeamCompetitionMockup() {
|
||||
style={{ backgroundColor: teamColors[i-1] }}
|
||||
/>
|
||||
<div
|
||||
className="h-5 w-5 rounded-full flex items-center justify-center font-semibold text-[10px] border-2"
|
||||
className="h-3.5 w-3.5 sm:h-4 sm:w-4 md:h-5 md:w-5 rounded-full flex items-center justify-center font-semibold text-[8px] sm:text-[9px] md:text-[10px] border-2"
|
||||
style={{
|
||||
borderColor: teamColors[i-1],
|
||||
backgroundColor: `${teamColors[i-1]}20`
|
||||
@@ -92,10 +175,13 @@ export default function TeamCompetitionMockup() {
|
||||
>
|
||||
<span className="text-white">{i}</span>
|
||||
</div>
|
||||
<div className="flex-1 min-w-0">
|
||||
<div className="h-2.5 w-full bg-white/10 rounded"></div>
|
||||
<div className="h-5 w-5 sm:h-6 sm:w-6 md:h-7 md:w-7 rounded-full flex items-center justify-center text-[10px] sm:text-xs" style={{ backgroundColor: `${teamColors[i-1]}20`, borderWidth: '1px', borderColor: teamColors[i-1] }}>
|
||||
🏎️
|
||||
</div>
|
||||
<div className="h-3 w-12 bg-charcoal-outline rounded font-mono text-[10px] flex items-center justify-center text-white/70"></div>
|
||||
<div className="flex-1 min-w-0">
|
||||
<div className="h-1.5 sm:h-2 md:h-2.5 w-full bg-white/10 rounded"></div>
|
||||
</div>
|
||||
<div className="h-2 sm:h-2.5 md:h-3 w-8 sm:w-10 md:w-12 bg-charcoal-outline rounded font-mono text-[8px] sm:text-[9px] md:text-[10px] flex items-center justify-center text-white/70"></div>
|
||||
{hoveredDriver === i && (
|
||||
<motion.div
|
||||
className="absolute inset-0 pointer-events-none"
|
||||
@@ -119,10 +205,10 @@ export default function TeamCompetitionMockup() {
|
||||
animate="visible"
|
||||
className="relative"
|
||||
>
|
||||
<div className="h-5 w-32 bg-white/10 rounded mb-4 text-xs flex items-center justify-center text-white font-semibold">
|
||||
<div className="h-3 sm:h-4 md:h-5 w-20 sm:w-24 md:w-32 bg-white/10 rounded mb-1.5 sm:mb-2 md:mb-3 lg:mb-4 text-[8px] sm:text-[10px] md:text-xs flex items-center justify-center text-white font-semibold">
|
||||
Constructors
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
<div className="space-y-1 sm:space-y-1.5 md:space-y-2">
|
||||
{[1, 2, 3, 4, 5].map((i) => (
|
||||
<motion.div
|
||||
key={i}
|
||||
@@ -130,7 +216,7 @@ export default function TeamCompetitionMockup() {
|
||||
variants={rowVariants}
|
||||
initial="hidden"
|
||||
animate="visible"
|
||||
className="relative flex items-center gap-3 bg-iron-gray rounded-lg p-2.5 border border-charcoal-outline overflow-hidden"
|
||||
className="relative flex items-center gap-1.5 sm:gap-2 md:gap-2.5 lg:gap-3 bg-iron-gray rounded-lg p-1 sm:p-1.5 md:p-2 lg:p-2.5 border border-charcoal-outline overflow-hidden"
|
||||
onHoverStart={() => !shouldReduceMotion && setHoveredTeam(i)}
|
||||
onHoverEnd={() => setHoveredTeam(null)}
|
||||
whileHover={shouldReduceMotion ? {} : {
|
||||
@@ -144,17 +230,17 @@ export default function TeamCompetitionMockup() {
|
||||
style={{ backgroundColor: teamColors[i-1] }}
|
||||
/>
|
||||
<div
|
||||
className="h-5 w-5 rounded flex items-center justify-center font-semibold text-[10px] border-2"
|
||||
className="h-5 w-5 sm:h-6 sm:w-6 md:h-7 md:w-7 rounded flex items-center justify-center text-[10px] sm:text-xs md:text-sm border-2"
|
||||
style={{
|
||||
borderColor: teamColors[i-1],
|
||||
backgroundColor: `${teamColors[i-1]}20`
|
||||
}}
|
||||
>
|
||||
<span className="text-white">{i}</span>
|
||||
🏁
|
||||
</div>
|
||||
<div className="flex-1 min-w-0">
|
||||
<div className="h-2.5 w-full bg-white/10 rounded mb-1.5"></div>
|
||||
<div className="relative h-1.5 bg-charcoal-outline rounded-full overflow-hidden">
|
||||
<div className="h-1.5 sm:h-2 md:h-2.5 w-full bg-white/10 rounded mb-0.5 sm:mb-1 md:mb-1.5"></div>
|
||||
<div className="relative h-0.5 sm:h-1 md:h-1.5 bg-charcoal-outline rounded-full overflow-hidden">
|
||||
<motion.div
|
||||
className="absolute inset-y-0 left-0 rounded-full"
|
||||
style={{ backgroundColor: teamColors[i-1] }}
|
||||
@@ -165,7 +251,7 @@ export default function TeamCompetitionMockup() {
|
||||
</div>
|
||||
</div>
|
||||
{i === 3 && (
|
||||
<div className="h-4 px-1.5 bg-warning-amber/20 rounded text-[9px] flex items-center justify-center text-warning-amber font-semibold border border-warning-amber/30">
|
||||
<div className="h-3 sm:h-3.5 md:h-4 px-0.5 sm:px-1 md:px-1.5 bg-warning-amber/20 rounded text-[7px] sm:text-[8px] md:text-[9px] flex items-center justify-center text-warning-amber font-semibold border border-warning-amber/30">
|
||||
=
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user