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 LeagueHomeMockup() {
|
||||
@@ -17,50 +16,50 @@ export function LeagueHomeMockup() {
|
||||
|
||||
if (isMobile) {
|
||||
return (
|
||||
<Box position="relative" fullWidth fullHeight bg="graphite-black" rounded="none" p={3} overflow="hidden">
|
||||
<Stack position="relative" fullWidth fullHeight bg="graphite-black" rounded="none" p={3} overflow="hidden">
|
||||
<Stack gap={4}>
|
||||
<Box display="flex" alignItems="center" gap={3} mb={2}>
|
||||
<Box h="12" w="12" rounded="none" border borderWidth="1px" borderColor="primary-accent/50" bg="panel-gray" display="flex" alignItems="center" justifyContent="center" className="relative">
|
||||
<Stack display="flex" alignItems="center" gap={3} mb={2}>
|
||||
<Stack h="12" w="12" rounded="none" border borderWidth="1px" borderColor="primary-accent/50" bg="panel-gray" display="flex" alignItems="center" justifyContent="center" className="relative">
|
||||
<Text size="2xl">🏆</Text>
|
||||
<Box position="absolute" top="-1px" left="-1px" w="2" h="2" borderTop borderLeft borderColor="primary-accent" />
|
||||
</Box>
|
||||
<Box>
|
||||
<Stack position="absolute" top="-1px" left="-1px" w="2" h="2" borderTop borderLeft borderColor="primary-accent" />
|
||||
</Stack>
|
||||
<Stack>
|
||||
<Text size="base" weight="bold" color="text-white" block className="uppercase tracking-widest">Super GT</Text>
|
||||
<Text size="xs" color="text-gray-500" block font="mono">ROUND 8/12</Text>
|
||||
</Box>
|
||||
</Box>
|
||||
</Stack>
|
||||
</Stack>
|
||||
|
||||
<Box>
|
||||
<Stack>
|
||||
<Text size="xs" weight="bold" color="text-gray-500" mb={3} block className="uppercase tracking-widest">Next Race</Text>
|
||||
<Box position="relative" display="flex" alignItems="center" gap={3} bg="panel-gray/40" rounded="none" p={3} border borderColor="border-gray/50">
|
||||
<Box h="8" w="8" bg="graphite-black" rounded="none" border borderColor="primary-accent/20" display="flex" alignItems="center" justifyContent="center">
|
||||
<Stack position="relative" display="flex" alignItems="center" gap={3} bg="panel-gray/40" rounded="none" p={3} border borderColor="border-gray/50">
|
||||
<Stack h="8" w="8" bg="graphite-black" rounded="none" border borderColor="primary-accent/20" display="flex" alignItems="center" justifyContent="center">
|
||||
<Text size="base">🏁</Text>
|
||||
</Box>
|
||||
<Box flexGrow={1}>
|
||||
<Box h="2" w="28" bg="white/10" rounded="none" mb={2} />
|
||||
<Box h="1.5" w="20" bg="white/5" rounded="none" />
|
||||
</Box>
|
||||
<Box w="1.5" h="1.5" bg="primary-accent" rounded="full" className="animate-pulse" />
|
||||
</Box>
|
||||
</Box>
|
||||
</Stack>
|
||||
<Stack flexGrow={1}>
|
||||
<Stack h="2" w="28" bg="white/10" rounded="none" mb={2} />
|
||||
<Stack h="1.5" w="20" bg="white/5" rounded="none" />
|
||||
</Stack>
|
||||
<Stack w="1.5" h="1.5" bg="primary-accent" rounded="full" className="animate-pulse" />
|
||||
</Stack>
|
||||
</Stack>
|
||||
|
||||
<Box>
|
||||
<Stack>
|
||||
<Text size="xs" weight="bold" color="text-gray-500" mb={3} block className="uppercase tracking-widest">Latest Result</Text>
|
||||
<Box bg="panel-gray/40" rounded="none" p={3} border borderColor="border-gray/50">
|
||||
<Box display="flex" alignItems="center" gap={3} py={2} borderBottom borderColor="border-gray/30">
|
||||
<Box h="1.5" w="6" bg="white/10" rounded="none" />
|
||||
<Box h="1.5" flexGrow={1} bg="white/10" rounded="none" />
|
||||
<Box h="1.5" w="10" bg="white/10" rounded="none" />
|
||||
</Box>
|
||||
<Box display="flex" alignItems="center" gap={3} py={2}>
|
||||
<Box h="1.5" w="6" bg="white/5" rounded="none" />
|
||||
<Box h="1.5" flexGrow={1} bg="white/5" rounded="none" />
|
||||
<Box h="1.5" w="10" bg="success-green/20" rounded="none" />
|
||||
</Box>
|
||||
</Box>
|
||||
</Box>
|
||||
<Stack bg="panel-gray/40" rounded="none" p={3} border borderColor="border-gray/50">
|
||||
<Stack display="flex" alignItems="center" gap={3} py={2} borderBottom borderColor="border-gray/30">
|
||||
<Stack h="1.5" w="6" bg="white/10" rounded="none" />
|
||||
<Stack h="1.5" flexGrow={1} bg="white/10" rounded="none" />
|
||||
<Stack h="1.5" w="10" bg="white/10" rounded="none" />
|
||||
</Stack>
|
||||
<Stack display="flex" alignItems="center" gap={3} py={2}>
|
||||
<Stack h="1.5" w="6" bg="white/5" rounded="none" />
|
||||
<Stack h="1.5" flexGrow={1} bg="white/5" rounded="none" />
|
||||
<Stack h="1.5" w="10" bg="success-green/20" rounded="none" />
|
||||
</Stack>
|
||||
</Stack>
|
||||
</Stack>
|
||||
</Stack>
|
||||
</Box>
|
||||
</Stack>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -78,21 +77,21 @@ export function LeagueHomeMockup() {
|
||||
};
|
||||
|
||||
return (
|
||||
<Box position="relative" fullWidth fullHeight bg="graphite-black" rounded="none" p={{ base: 1.5, sm: 3, md: 5, lg: 8 }} overflow="hidden">
|
||||
<Box
|
||||
<Stack position="relative" fullWidth fullHeight bg="graphite-black" rounded="none" p={{ base: 1.5, sm: 3, md: 5, lg: 8 }} overflow="hidden">
|
||||
<Stack
|
||||
as={motion.div}
|
||||
variants={containerVariants}
|
||||
initial="hidden"
|
||||
animate="visible"
|
||||
>
|
||||
<Stack gap={{ base: 1.5, sm: 3, md: 4, lg: 6 }}>
|
||||
<Box as={motion.div} variants={itemVariants}>
|
||||
<Box display="flex" alignItems="center" gap={{ base: 1.5, sm: 2, md: 3, lg: 4 }} mb={{ base: 1, sm: 1.5, md: 2 }}>
|
||||
<Box h={{ base: 8, sm: 10, md: 12, lg: 16 }} w={{ base: 8, sm: 10, md: 12, lg: 16 }} rounded="none" border borderWidth="1px" borderColor="primary-accent/50" bg="panel-gray" display="flex" alignItems="center" justifyContent="center" className="relative">
|
||||
<Stack as={motion.div} variants={itemVariants}>
|
||||
<Stack display="flex" alignItems="center" gap={{ base: 1.5, sm: 2, md: 3, lg: 4 }} mb={{ base: 1, sm: 1.5, md: 2 }}>
|
||||
<Stack h={{ base: 8, sm: 10, md: 12, lg: 16 }} w={{ base: 8, sm: 10, md: 12, lg: 16 }} rounded="none" border borderWidth="1px" borderColor="primary-accent/50" bg="panel-gray" display="flex" alignItems="center" justifyContent="center" className="relative">
|
||||
<Text size={{ base: 'base', sm: 'xl', md: '2xl', lg: '3xl' }}>🏆</Text>
|
||||
<Box position="absolute" top="-1px" left="-1px" w="2" h="2" borderTop borderLeft borderColor="primary-accent" />
|
||||
</Box>
|
||||
<Box>
|
||||
<Stack position="absolute" top="-1px" left="-1px" w="2" h="2" borderTop borderLeft borderColor="primary-accent" />
|
||||
</Stack>
|
||||
<Stack>
|
||||
<Heading level={2} fontSize={{ base: 'sm', sm: 'base', md: 'lg', lg: 'xl' }} weight="bold" color="text-white" mb={0.5} className="uppercase tracking-widest">Super GT Championship</Heading>
|
||||
<Text
|
||||
// eslint-disable-next-line gridpilot-rules/component-classification
|
||||
@@ -103,15 +102,15 @@ export function LeagueHomeMockup() {
|
||||
>
|
||||
SEASON 3 • ROUND 8/12
|
||||
</Text>
|
||||
</Box>
|
||||
</Box>
|
||||
</Box>
|
||||
</Stack>
|
||||
</Stack>
|
||||
</Stack>
|
||||
|
||||
<Box as={motion.div} variants={itemVariants}>
|
||||
<Stack as={motion.div} variants={itemVariants}>
|
||||
<Text size={{ base: 'xs', sm: 'sm' }} weight="bold" color="text-gray-500" mb={{ base: 1.5, sm: 2, md: 3 }} block className="uppercase tracking-[0.2em]">Upcoming Races</Text>
|
||||
<Stack gap={{ base: 1.5, sm: 2, md: 3 }}>
|
||||
{[1, 2, 3].map((i) => (
|
||||
<Box
|
||||
<Stack
|
||||
key={i}
|
||||
as={motion.div}
|
||||
position="relative"
|
||||
@@ -129,15 +128,15 @@ export function LeagueHomeMockup() {
|
||||
transition: { duration: 0.15 }
|
||||
}}
|
||||
>
|
||||
<Box h={{ base: 6, sm: 7, md: 8, lg: 10 }} w={{ base: 6, sm: 7, md: 8, lg: 10 }} bg="graphite-black" rounded="none" border borderColor="primary-accent/20" display="flex" alignItems="center" justifyContent="center">
|
||||
<Stack h={{ base: 6, sm: 7, md: 8, lg: 10 }} w={{ base: 6, sm: 7, md: 8, lg: 10 }} bg="graphite-black" rounded="none" border borderColor="primary-accent/20" display="flex" alignItems="center" justifyContent="center">
|
||||
<Text size={{ base: 'sm', sm: 'base', md: 'lg', lg: 'xl' }}>🏁</Text>
|
||||
</Box>
|
||||
<Box flexGrow={1}>
|
||||
<Box h="1.5" w={i === 1 ? "32" : "24"} bg="white/10" rounded="none" mb={{ base: 1, sm: 1.5, md: 2 }} />
|
||||
<Box h="1" w="16" bg="white/5" rounded="none" />
|
||||
</Box>
|
||||
</Stack>
|
||||
<Stack flexGrow={1}>
|
||||
<Stack h="1.5" w={i === 1 ? "32" : "24"} bg="white/10" rounded="none" mb={{ base: 1, sm: 1.5, md: 2 }} />
|
||||
<Stack h="1" w="16" bg="white/5" rounded="none" />
|
||||
</Stack>
|
||||
{i === 1 && (
|
||||
<Box
|
||||
<Stack
|
||||
as={motion.div}
|
||||
position="absolute"
|
||||
right="4"
|
||||
@@ -146,33 +145,33 @@ export function LeagueHomeMockup() {
|
||||
}}
|
||||
transition={{ duration: 2, repeat: Infinity }}
|
||||
>
|
||||
<Box w="1.5" h="1.5" bg="primary-accent" rounded="full" />
|
||||
</Box>
|
||||
<Stack w="1.5" h="1.5" bg="primary-accent" rounded="full" />
|
||||
</Stack>
|
||||
)}
|
||||
</Box>
|
||||
</Stack>
|
||||
))}
|
||||
</Stack>
|
||||
</Box>
|
||||
</Stack>
|
||||
|
||||
<Box as={motion.div} variants={itemVariants}>
|
||||
<Stack as={motion.div} variants={itemVariants}>
|
||||
<Text size={{ base: 'xs', sm: 'sm' }} weight="bold" color="text-gray-500" mb={{ base: 1.5, sm: 2, md: 3 }} block className="uppercase tracking-[0.2em]">Recent Results</Text>
|
||||
<Box bg="panel-gray/20" rounded="none" p={{ base: 1.5, sm: 2, md: 3, lg: 4 }} border borderColor="border-gray/50">
|
||||
<Box display="flex" alignItems="center" gap={{ base: 1.5, sm: 2, md: 3 }} mb={{ base: 1.5, sm: 2, md: 3 }} pb={{ base: 1.5, sm: 2, md: 3 }} borderBottom borderColor="border-gray/30">
|
||||
<Box h="1" w="6" bg="white/10" rounded="none" />
|
||||
<Box h="1" flexGrow={1} bg="white/10" rounded="none" />
|
||||
<Box h="1" w="10" bg="white/10" rounded="none" />
|
||||
</Box>
|
||||
<Stack bg="panel-gray/20" rounded="none" p={{ base: 1.5, sm: 2, md: 3, lg: 4 }} border borderColor="border-gray/50">
|
||||
<Stack display="flex" alignItems="center" gap={{ base: 1.5, sm: 2, md: 3 }} mb={{ base: 1.5, sm: 2, md: 3 }} pb={{ base: 1.5, sm: 2, md: 3 }} borderBottom borderColor="border-gray/30">
|
||||
<Stack h="1" w="6" bg="white/10" rounded="none" />
|
||||
<Stack h="1" flexGrow={1} bg="white/10" rounded="none" />
|
||||
<Stack h="1" w="10" bg="white/10" rounded="none" />
|
||||
</Stack>
|
||||
{[1, 2].map((i) => (
|
||||
<Box key={i} display="flex" alignItems="center" gap={{ base: 1.5, sm: 2, md: 3 }} py={{ base: 1, sm: 1.5, md: 2 }}>
|
||||
<Box h="1" w="6" bg="white/5" rounded="none" />
|
||||
<Box h="1" flexGrow={1} bg="white/5" rounded="none" />
|
||||
<Box h="1" w="10" bg={i === 1 ? "success-green/20" : "white/5"} rounded="none" />
|
||||
</Box>
|
||||
<Stack key={i} display="flex" alignItems="center" gap={{ base: 1.5, sm: 2, md: 3 }} py={{ base: 1, sm: 1.5, md: 2 }}>
|
||||
<Stack h="1" w="6" bg="white/5" rounded="none" />
|
||||
<Stack h="1" flexGrow={1} bg="white/5" rounded="none" />
|
||||
<Stack h="1" w="10" bg={i === 1 ? "success-green/20" : "white/5"} rounded="none" />
|
||||
</Stack>
|
||||
))}
|
||||
</Box>
|
||||
</Box>
|
||||
</Stack>
|
||||
</Stack>
|
||||
</Stack>
|
||||
</Box>
|
||||
</Box>
|
||||
</Stack>
|
||||
</Stack>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user