website refactor

This commit is contained in:
2026-01-15 17:12:24 +01:00
parent c3b308e960
commit f035cfe7ce
468 changed files with 24378 additions and 17324 deletions

View File

@@ -2,8 +2,14 @@
import { motion, useReducedMotion } from 'framer-motion';
import { useState, useEffect } from 'react';
import { Check } from 'lucide-react';
import { Box } from '@/ui/Box';
import { Text } from '@/ui/Text';
import { Stack } from '@/ui/Stack';
import { Heading } from '@/ui/Heading';
import { Icon } from '@/ui/Icon';
export default function CompanionAutomationMockup() {
export function CompanionAutomationMockup() {
const shouldReduceMotion = useReducedMotion();
const [isMobile, setIsMobile] = useState(false);
@@ -17,55 +23,72 @@ export default function CompanionAutomationMockup() {
// 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
<Box position="relative" fullWidth fullHeight bg="bg-gradient-to-br from-deep-graphite to-iron-gray" rounded="lg" p={4} overflow="hidden" display="flex" alignItems="center" justifyContent="center">
<Box
as={motion.div}
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
className="space-y-4 w-full"
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>
<Stack gap={4}>
{/* Simple progress indicator */}
<Box bg="bg-iron-gray/60" rounded="xl" p={4} border borderColor="border-primary-blue/40">
<Box display="flex" alignItems="center" gap={3} mb={3}>
<Box
as={motion.div}
h="8"
w="8"
bg="bg-performance-green/40"
rounded="full"
display="flex"
alignItems="center"
justifyContent="center"
border
borderWidth="2px"
borderColor="border-performance-green/60"
flexShrink={0}
animate={shouldReduceMotion ? {} : {
scale: [1, 1.1, 1],
opacity: [0.6, 1, 0.6]
}}
transition={{ duration: 1.5, repeat: Infinity }}
>
<Box h="3" w="3" bg="bg-performance-green" rounded="full" />
</Box>
<Box>
<Text size="sm" color="text-white" weight="medium" block>Creating Session</Text>
<Text size="xs" color="text-white" opacity={0.5} block>Automated</Text>
</Box>
</Box>
<Box h="2.5" fullWidth bg="bg-white/5" rounded="full" overflow="hidden">
<Box
as={motion.div}
h="full"
bg="bg-primary-blue/60"
initial={{ width: '0%' }}
animate={{ width: '75%' }}
transition={{ duration: 2, ease: 'easeInOut' }}
/>
</Box>
</Box>
{/* 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>
{/* Simple CTA */}
<Box display="flex" justifyContent="center">
<Box bg="bg-primary-blue/20" color="text-primary-blue" px={6} py={2.5} rounded="lg" border borderColor="border-primary-blue/40">
<Text size="sm" weight="semibold">One Click</Text>
</Box>
</Box>
</Stack>
</Box>
</Box>
);
}
// 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-3 md:p-4 lg:p-6 overflow-hidden">
<motion.div
<Box position="relative" fullWidth fullHeight bg="bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite" rounded="lg" p={{ base: 3, md: 4, lg: 6 }} overflow="hidden">
<Box
as={motion.div}
initial="hidden"
animate="visible"
variants={{
@@ -75,143 +98,218 @@ export default function CompanionAutomationMockup() {
transition: { staggerChildren: shouldReduceMotion ? 0 : 0.12 }
}
}}
className="space-y-3 md:space-y-4 lg:space-y-5"
>
{/* 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-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>
<Stack gap={{ base: 3, md: 4, lg: 5 }}>
{/* Companion App Header - Enhanced */}
<Box as={motion.div} variants={{ hidden: { opacity: 0, y: -10 }, visible: { opacity: 1, y: 0 } }}>
<Box display="flex" alignItems="center" gap={{ base: 2.5, md: 3, lg: 4 }} mb={{ base: 3, md: 4, lg: 5 }}>
<Box h={{ base: 10, md: 12, lg: 14 }} w={{ base: 10, md: 12, lg: 14 }} bg="bg-primary-blue/20" rounded="lg" border borderWidth="2px" borderColor="border-primary-blue/40" display="flex" alignItems="center" justifyContent="center" shadow="lg">
<Box h={{ base: 6, md: 7, lg: 8 }} w={{ base: 6, md: 7, lg: 8 }} bg="bg-primary-blue/60" rounded="sm" />
</Box>
<Box>
<Heading level={2} fontSize={{ base: 'base', md: 'lg', lg: 'xl' }} weight="semibold" color="text-white">GridPilot Companion</Heading>
<Text size={{ base: 'xs', md: 'sm', lg: 'base' }} color="text-white" opacity={0.5} block>Automated Session Creator</Text>
</Box>
</Box>
</Box>
{/* 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 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 - 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={index}
className="space-y-2"
initial={{ opacity: 0, x: -10 }}
animate={{
opacity: 1,
x: 0,
transition: { delay: shouldReduceMotion ? 0 : 0.4 + (index * 0.15) }
}}
>
<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>
</div>
{/* Automation Running Indicator */}
<motion.div
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 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 }}
{/* Browser Automation Visual - Full workflow */}
<Box
as={motion.div}
variants={{ hidden: { opacity: 0, y: 10 }, visible: { opacity: 1, y: 0 } }}
position="relative"
bg="bg-charcoal-outline"
rounded="lg"
p={{ base: 3, md: 4, lg: 5 }}
border
borderWidth="2px"
borderColor="border-primary-blue/40"
overflow="hidden"
>
<motion.div
className="h-2.5 w-2.5 md:h-3 md:w-3 bg-primary-blue rounded-full"
{/* Browser Window Mockup */}
<Stack gap={{ base: 3, md: 4 }}>
<Box display="flex" alignItems="center" gap={{ base: 2, md: 2.5 }} pb={{ base: 3, md: 4 }} borderBottom borderColor="border-white/10">
<Box h={{ base: 2.5, md: 3 }} w={{ base: 2.5, md: 3 }} bg="bg-red-500/60" rounded="full" />
<Box h={{ base: 2.5, md: 3 }} w={{ base: 2.5, md: 3 }} bg="bg-warning-amber/60" rounded="full" />
<Box h={{ base: 2.5, md: 3 }} w={{ base: 2.5, md: 3 }} bg="bg-performance-green/60" rounded="full" />
<Box flexGrow={1} h={{ base: 2.5, md: 3 }} bg="bg-white/5" rounded="sm" ml={2} px={2} display="flex" alignItems="center">
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '8px' }}
color="text-white"
opacity={0.3}
font="mono"
>
members.iracing.com
</Text>
</Box>
</Box>
{/* Automation Steps - More detailed */}
<Stack gap={{ base: 3, md: 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) => (
<Box
key={index}
as={motion.div}
initial={{ opacity: 0, x: -10 }}
animate={{
opacity: 1,
x: 0,
transition: { delay: shouldReduceMotion ? 0 : 0.4 + (index * 0.15) }
}}
>
<Stack gap={2}>
<Box display="flex" alignItems="center" gap={{ base: 2.5, md: 3 }}>
<Box
as={motion.div}
h={{ base: 7, md: 8, lg: 9 }}
w={{ base: 7, md: 8, lg: 9 }}
rounded="full"
display="flex"
alignItems="center"
justifyContent="center"
flexShrink={0}
border
borderWidth="2px"
bg={
step.status === 'Complete'
? 'bg-performance-green/40'
: step.status === 'Running'
? 'bg-primary-blue/40'
: 'bg-charcoal-outline'
}
borderColor={
step.status === 'Complete'
? 'border-performance-green/60'
: step.status === 'Running'
? 'border-primary-blue/60'
: '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' && (
<Icon icon={Check} size={5} color="text-performance-green" />
)}
{step.status === 'Running' && (
<Box h={{ base: 3, md: 4 }} w={{ base: 3, md: 4 }} bg="bg-primary-blue" rounded="full" />
)}
{step.status === 'Pending' && (
<Box h={{ base: 2, md: 2.5 }} w={{ base: 2, md: 2.5 }} bg="bg-white/30" rounded="full" />
)}
</Box>
<Box flexGrow={1}>
<Text size={{ base: 'sm', md: 'base', lg: 'lg' }} color="text-white" weight="medium" block>{step.label}</Text>
<Text size={{ base: 'xs', md: 'sm' }} color="text-white" opacity={0.5} block>{step.detail}</Text>
</Box>
</Box>
{step.status !== 'Pending' && (
<Box h={{ base: 2.5, md: 3 }} fullWidth bg="bg-white/5" rounded="full" overflow="hidden" ml={{ base: 9, md: 10, lg: 11 }}>
<Box
as={motion.div}
h="full"
bg={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' }}
/>
</Box>
)}
</Stack>
</Box>
))}
</Stack>
</Stack>
{/* Automation Running Indicator */}
<Box
as={motion.div}
position="absolute"
top="3"
right="3"
display="flex"
alignItems="center"
gap={2}
bg="bg-deep-graphite/90"
// eslint-disable-next-line gridpilot-rules/component-classification
className="backdrop-blur-sm"
px={3}
py={2}
rounded="full"
border
borderWidth="2px"
borderColor="border-primary-blue/40"
animate={shouldReduceMotion ? {} : {
opacity: [1, 0.5, 1]
boxShadow: [
'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: 1.5, repeat: Infinity }}
/>
<div className="text-xs md:text-sm text-primary-blue font-medium">Running</div>
</motion.div>
</motion.div>
transition={{ duration: 2, repeat: Infinity }}
>
<Box
as={motion.div}
h={{ base: 2.5, md: 3 }}
w={{ base: 2.5, md: 3 }}
bg="bg-primary-blue"
rounded="full"
animate={shouldReduceMotion ? {} : {
opacity: [1, 0.5, 1]
}}
transition={{ duration: 1.5, repeat: Infinity }}
/>
<Text size={{ base: 'xs', md: 'sm' }} color="text-primary-blue" weight="medium">Running</Text>
</Box>
</Box>
{/* 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-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)',
transition: { duration: 0.15 }
}}
{/* One-Click Action - Enhanced */}
<Box
as={motion.div}
variants={{ hidden: { opacity: 0, y: 10 }, visible: { opacity: 1, y: 0 } }}
display="flex"
flexDirection="col"
alignItems="center"
gap={{ base: 2, md: 3 }}
>
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>
<Box
as={motion.div}
bg="bg-primary-blue/20"
color="text-primary-blue"
px={8}
py={4}
rounded="lg"
border
borderWidth="2px"
borderColor="border-primary-blue/40"
cursor="pointer"
whileHover={shouldReduceMotion ? {} : {
scale: 1.03,
boxShadow: '0 4px 24px rgba(25,140,255,0.3)',
transition: { duration: 0.15 }
}}
>
<Text size={{ base: 'base', md: 'lg' }} weight="semibold">Create Session</Text>
</Box>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
color="text-white"
opacity={0.4}
>
One click. All fields automated.
</Text>
</Box>
</Stack>
</Box>
</Box>
);
}
}