website refactor
This commit is contained in:
@@ -2,9 +2,8 @@
|
||||
|
||||
import { motion, useReducedMotion } from 'framer-motion';
|
||||
import { useState, useEffect } from 'react';
|
||||
import { Box } from '@/ui/Box';
|
||||
import { Text } from '@/ui/Text';
|
||||
import { Stack } from '@/ui/Stack';
|
||||
import { Text } from '@/ui/Text';
|
||||
import { Heading } from '@/ui/Heading';
|
||||
|
||||
export function CompanionAutomationMockup() {
|
||||
@@ -21,8 +20,8 @@ export function CompanionAutomationMockup() {
|
||||
// Simple mobile version - just the essence of automation
|
||||
if (isMobile) {
|
||||
return (
|
||||
<Box position="relative" fullWidth fullHeight bg="graphite-black" rounded="none" p={4} overflow="hidden" display="flex" alignItems="center" justifyContent="center">
|
||||
<Box
|
||||
<Stack position="relative" fullWidth fullHeight bg="graphite-black" rounded="none" p={4} overflow="hidden" display="flex" alignItems="center" justifyContent="center">
|
||||
<Stack
|
||||
as={motion.div}
|
||||
initial={{ opacity: 0 }}
|
||||
animate={{ opacity: 1 }}
|
||||
@@ -30,9 +29,9 @@ export function CompanionAutomationMockup() {
|
||||
>
|
||||
<Stack gap={4}>
|
||||
{/* Simple progress indicator */}
|
||||
<Box bg="panel-gray/60" rounded="none" p={4} border borderColor="primary-accent/40">
|
||||
<Box display="flex" alignItems="center" gap={3} mb={3}>
|
||||
<Box
|
||||
<Stack bg="panel-gray/60" rounded="none" p={4} border borderColor="primary-accent/40">
|
||||
<Stack display="flex" alignItems="center" gap={3} mb={3}>
|
||||
<Stack
|
||||
as={motion.div}
|
||||
h="8"
|
||||
w="8"
|
||||
@@ -52,16 +51,16 @@ export function CompanionAutomationMockup() {
|
||||
transition={{ duration: 1.5, repeat: Infinity }}
|
||||
className="relative"
|
||||
>
|
||||
<Box h="2" w="2" bg="success-green" />
|
||||
<Box position="absolute" top="-1px" left="-1px" w="2" h="2" borderTop borderLeft borderColor="success-green" />
|
||||
</Box>
|
||||
<Box>
|
||||
<Stack h="2" w="2" bg="success-green" />
|
||||
<Stack position="absolute" top="-1px" left="-1px" w="2" h="2" borderTop borderLeft borderColor="success-green" />
|
||||
</Stack>
|
||||
<Stack>
|
||||
<Text size="sm" color="text-white" weight="bold" block className="uppercase tracking-widest">Creating Session</Text>
|
||||
<Text size="xs" color="text-gray-500" block font="mono">AUTOMATED</Text>
|
||||
</Box>
|
||||
</Box>
|
||||
<Box h="1" fullWidth bg="white/5" rounded="none" overflow="hidden">
|
||||
<Box
|
||||
</Stack>
|
||||
</Stack>
|
||||
<Stack h="1" fullWidth bg="white/5" rounded="none" overflow="hidden">
|
||||
<Stack
|
||||
as={motion.div}
|
||||
h="full"
|
||||
bg="primary-accent"
|
||||
@@ -69,25 +68,25 @@ export function CompanionAutomationMockup() {
|
||||
animate={{ width: '75%' }}
|
||||
transition={{ duration: 2, ease: 'easeInOut' }}
|
||||
/>
|
||||
</Box>
|
||||
</Box>
|
||||
</Stack>
|
||||
</Stack>
|
||||
|
||||
{/* Simple CTA */}
|
||||
<Box display="flex" justifyContent="center">
|
||||
<Box bg="primary-accent/10" color="text-primary-accent" px={6} py={2.5} rounded="none" border borderColor="primary-accent/30">
|
||||
<Stack display="flex" justifyContent="center">
|
||||
<Stack bg="primary-accent/10" color="text-primary-accent" px={6} py={2.5} rounded="none" border borderColor="primary-accent/30">
|
||||
<Text size="xs" weight="bold" className="uppercase tracking-[0.2em]">One Click</Text>
|
||||
</Box>
|
||||
</Box>
|
||||
</Stack>
|
||||
</Stack>
|
||||
</Stack>
|
||||
</Box>
|
||||
</Box>
|
||||
</Stack>
|
||||
</Stack>
|
||||
);
|
||||
}
|
||||
|
||||
// Desktop version - richer with more automation steps
|
||||
return (
|
||||
<Box position="relative" fullWidth fullHeight bg="graphite-black" rounded="none" p={{ base: 3, md: 4, lg: 6 }} overflow="hidden">
|
||||
<Box
|
||||
<Stack position="relative" fullWidth fullHeight bg="graphite-black" rounded="none" p={{ base: 3, md: 4, lg: 6 }} overflow="hidden">
|
||||
<Stack
|
||||
as={motion.div}
|
||||
initial="hidden"
|
||||
animate="visible"
|
||||
@@ -101,22 +100,22 @@ export function CompanionAutomationMockup() {
|
||||
>
|
||||
<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="primary-accent/10" rounded="none" border borderWidth="1px" borderColor="primary-accent/30" display="flex" alignItems="center" justifyContent="center" className="relative">
|
||||
<Box h={{ base: 6, md: 7, lg: 8 }} w={{ base: 6, md: 7, lg: 8 }} bg="primary-accent/40" />
|
||||
<Box position="absolute" top="-1px" left="-1px" w="2" h="2" borderTop borderLeft borderColor="primary-accent" />
|
||||
<Box position="absolute" bottom="-1px" right="-1px" w="2" h="2" borderBottom borderRight borderColor="primary-accent" />
|
||||
</Box>
|
||||
<Box>
|
||||
<Stack as={motion.div} variants={{ hidden: { opacity: 0, y: -10 }, visible: { opacity: 1, y: 0 } }}>
|
||||
<Stack display="flex" alignItems="center" gap={{ base: 2.5, md: 3, lg: 4 }} mb={{ base: 3, md: 4, lg: 5 }}>
|
||||
<Stack h={{ base: 10, md: 12, lg: 14 }} w={{ base: 10, md: 12, lg: 14 }} bg="primary-accent/10" rounded="none" border borderWidth="1px" borderColor="primary-accent/30" display="flex" alignItems="center" justifyContent="center" className="relative">
|
||||
<Stack h={{ base: 6, md: 7, lg: 8 }} w={{ base: 6, md: 7, lg: 8 }} bg="primary-accent/40" />
|
||||
<Stack position="absolute" top="-1px" left="-1px" w="2" h="2" borderTop borderLeft borderColor="primary-accent" />
|
||||
<Stack position="absolute" bottom="-1px" right="-1px" w="2" h="2" borderBottom borderRight borderColor="primary-accent" />
|
||||
</Stack>
|
||||
<Stack>
|
||||
<Heading level={2} fontSize={{ base: 'base', md: 'lg', lg: 'xl' }} weight="bold" color="text-white" className="uppercase tracking-widest">GridPilot Companion</Heading>
|
||||
<Text size={{ base: 'xs', md: 'sm', lg: 'base' }} color="text-gray-500" block font="mono">AUTOMATED SESSION CREATOR</Text>
|
||||
</Box>
|
||||
</Box>
|
||||
</Box>
|
||||
</Stack>
|
||||
</Stack>
|
||||
</Stack>
|
||||
|
||||
{/* Browser Automation Visual - Full workflow */}
|
||||
<Box
|
||||
<Stack
|
||||
as={motion.div}
|
||||
variants={{ hidden: { opacity: 0, y: 10 }, visible: { opacity: 1, y: 0 } }}
|
||||
position="relative"
|
||||
@@ -130,11 +129,11 @@ export function CompanionAutomationMockup() {
|
||||
>
|
||||
{/* 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-gray/30">
|
||||
<Box h="2" w="2" bg="critical-red/40" rounded="none" />
|
||||
<Box h="2" w="2" bg="warning-amber/40" rounded="none" />
|
||||
<Box h="2" w="2" bg="success-green/40" rounded="none" />
|
||||
<Box flexGrow={1} h="4" bg="graphite-black" rounded="none" ml={2} px={2} display="flex" alignItems="center" border borderColor="border-gray/30">
|
||||
<Stack display="flex" alignItems="center" gap={{ base: 2, md: 2.5 }} pb={{ base: 3, md: 4 }} borderBottom borderColor="border-gray/30">
|
||||
<Stack h="2" w="2" bg="critical-red/40" rounded="none" />
|
||||
<Stack h="2" w="2" bg="warning-amber/40" rounded="none" />
|
||||
<Stack h="2" w="2" bg="success-green/40" rounded="none" />
|
||||
<Stack flexGrow={1} h="4" bg="graphite-black" rounded="none" ml={2} px={2} display="flex" alignItems="center" border borderColor="border-gray/30">
|
||||
<Text
|
||||
// eslint-disable-next-line gridpilot-rules/component-classification
|
||||
style={{ fontSize: '8px' }}
|
||||
@@ -143,8 +142,8 @@ export function CompanionAutomationMockup() {
|
||||
>
|
||||
members.iracing.com
|
||||
</Text>
|
||||
</Box>
|
||||
</Box>
|
||||
</Stack>
|
||||
</Stack>
|
||||
|
||||
{/* Automation Steps - More detailed */}
|
||||
<Stack gap={{ base: 3, md: 4 }}>
|
||||
@@ -154,7 +153,7 @@ export function CompanionAutomationMockup() {
|
||||
{ label: 'Create Session', status: 'Running', detail: 'Filling form...' },
|
||||
{ label: 'Configure Settings', status: 'Pending', detail: 'Waiting...' }
|
||||
].map((step, index) => (
|
||||
<Box
|
||||
<Stack
|
||||
key={index}
|
||||
as={motion.div}
|
||||
initial={{ opacity: 0, x: -10 }}
|
||||
@@ -165,8 +164,8 @@ export function CompanionAutomationMockup() {
|
||||
}}
|
||||
>
|
||||
<Stack gap={2}>
|
||||
<Box display="flex" alignItems="center" gap={{ base: 2.5, md: 3 }}>
|
||||
<Box
|
||||
<Stack display="flex" alignItems="center" gap={{ base: 2.5, md: 3 }}>
|
||||
<Stack
|
||||
as={motion.div}
|
||||
h={{ base: 7, md: 8, lg: 9 }}
|
||||
w={{ base: 7, md: 8, lg: 9 }}
|
||||
@@ -197,23 +196,23 @@ export function CompanionAutomationMockup() {
|
||||
transition={{ duration: 1.5, repeat: Infinity }}
|
||||
>
|
||||
{step.status === 'Complete' && (
|
||||
<Box w="2" h="2" bg="success-green" />
|
||||
<Stack w="2" h="2" bg="success-green" />
|
||||
)}
|
||||
{step.status === 'Running' && (
|
||||
<Box h="2" w="2" bg="primary-accent" />
|
||||
<Stack h="2" w="2" bg="primary-accent" />
|
||||
)}
|
||||
{step.status === 'Pending' && (
|
||||
<Box h="1" w="1" bg="gray-700" />
|
||||
<Stack h="1" w="1" bg="gray-700" />
|
||||
)}
|
||||
</Box>
|
||||
<Box flexGrow={1}>
|
||||
</Stack>
|
||||
<Stack flexGrow={1}>
|
||||
<Text size={{ base: 'sm', md: 'base' }} color="text-white" weight="bold" block className="uppercase tracking-widest">{step.label}</Text>
|
||||
<Text size="xs" color="text-gray-500" block font="mono">{step.detail.toUpperCase()}</Text>
|
||||
</Box>
|
||||
</Box>
|
||||
</Stack>
|
||||
</Stack>
|
||||
{step.status !== 'Pending' && (
|
||||
<Box h="1" fullWidth bg="white/5" rounded="none" overflow="hidden" ml={{ base: 9, md: 10, lg: 11 }}>
|
||||
<Box
|
||||
<Stack h="1" fullWidth bg="white/5" rounded="none" overflow="hidden" ml={{ base: 9, md: 10, lg: 11 }}>
|
||||
<Stack
|
||||
as={motion.div}
|
||||
h="full"
|
||||
bg={step.status === 'Complete' ? 'success-green/60' : 'primary-accent/60'}
|
||||
@@ -221,16 +220,16 @@ export function CompanionAutomationMockup() {
|
||||
animate={{ width: step.status === 'Complete' ? '100%' : '65%' }}
|
||||
transition={{ duration: 2, ease: 'easeInOut' }}
|
||||
/>
|
||||
</Box>
|
||||
</Stack>
|
||||
)}
|
||||
</Stack>
|
||||
</Box>
|
||||
</Stack>
|
||||
))}
|
||||
</Stack>
|
||||
</Stack>
|
||||
|
||||
{/* Automation Running Indicator */}
|
||||
<Box
|
||||
<Stack
|
||||
as={motion.div}
|
||||
position="absolute"
|
||||
top="3"
|
||||
@@ -254,7 +253,7 @@ export function CompanionAutomationMockup() {
|
||||
}}
|
||||
transition={{ duration: 2, repeat: Infinity }}
|
||||
>
|
||||
<Box
|
||||
<Stack
|
||||
as={motion.div}
|
||||
h="1.5"
|
||||
w="1.5"
|
||||
@@ -265,11 +264,11 @@ export function CompanionAutomationMockup() {
|
||||
transition={{ duration: 1.5, repeat: Infinity }}
|
||||
/>
|
||||
<Text size="xs" color="text-primary-accent" weight="bold" className="uppercase tracking-widest">Running</Text>
|
||||
</Box>
|
||||
</Box>
|
||||
</Stack>
|
||||
</Stack>
|
||||
|
||||
{/* One-Click Action - Enhanced */}
|
||||
<Box
|
||||
<Stack
|
||||
as={motion.div}
|
||||
variants={{ hidden: { opacity: 0, y: 10 }, visible: { opacity: 1, y: 0 } }}
|
||||
display="flex"
|
||||
@@ -277,7 +276,7 @@ export function CompanionAutomationMockup() {
|
||||
alignItems="center"
|
||||
gap={3}
|
||||
>
|
||||
<Box
|
||||
<Stack
|
||||
as={motion.div}
|
||||
bg="primary-accent/10"
|
||||
color="text-primary-accent"
|
||||
@@ -296,9 +295,9 @@ export function CompanionAutomationMockup() {
|
||||
className="relative"
|
||||
>
|
||||
<Text size="sm" weight="bold" className="uppercase tracking-[0.2em]">Create Session</Text>
|
||||
<Box position="absolute" top="-1px" left="-1px" w="2" h="2" borderTop borderLeft borderColor="primary-accent" />
|
||||
<Box position="absolute" bottom="-1px" right="-1px" w="2" h="2" borderBottom borderRight borderColor="primary-accent" />
|
||||
</Box>
|
||||
<Stack position="absolute" top="-1px" left="-1px" w="2" h="2" borderTop borderLeft borderColor="primary-accent" />
|
||||
<Stack position="absolute" bottom="-1px" right="-1px" w="2" h="2" borderBottom borderRight borderColor="primary-accent" />
|
||||
</Stack>
|
||||
<Text
|
||||
// eslint-disable-next-line gridpilot-rules/component-classification
|
||||
style={{ fontSize: '10px' }}
|
||||
@@ -308,9 +307,9 @@ export function CompanionAutomationMockup() {
|
||||
>
|
||||
One click. All fields automated.
|
||||
</Text>
|
||||
</Box>
|
||||
</Stack>
|
||||
</Stack>
|
||||
</Box>
|
||||
</Box>
|
||||
</Stack>
|
||||
</Stack>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user