website refactor

This commit is contained in:
2026-01-18 16:18:18 +01:00
parent 0b301feb61
commit 13567d51af
329 changed files with 4701 additions and 4750 deletions

View File

@@ -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';
export function TeamCompetitionMockup() {
const shouldReduceMotion = useReducedMotion();
@@ -20,13 +19,13 @@ export function TeamCompetitionMockup() {
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>
<Stack>
<Text size="xs" weight="bold" color="text-gray-500" mb={3} block className="uppercase tracking-widest">Drivers</Text>
<Stack gap={1}>
{[1, 2, 3].map((i) => (
<Box
<Stack
key={i}
position="relative"
display="flex"
@@ -39,7 +38,7 @@ export function TeamCompetitionMockup() {
borderColor="border-gray/20"
overflow="hidden"
>
<Box
<Stack
position="absolute"
left="0"
top="0"
@@ -47,7 +46,7 @@ export function TeamCompetitionMockup() {
w="0.5"
style={{ backgroundColor: teamColors[i-1] }}
/>
<Box
<Stack
h="5"
w="5"
rounded="none"
@@ -63,23 +62,23 @@ export function TeamCompetitionMockup() {
}}
>
<Text color="text-white" font="mono">{i}</Text>
</Box>
<Box flexGrow={1}>
<Box h="1.5" w="full" bg="white/10" rounded="none" />
</Box>
<Box h="3" w="10" bg="graphite-black" rounded="none" border borderColor="border-gray/30" />
</Box>
</Stack>
<Stack flexGrow={1}>
<Stack h="1.5" w="full" bg="white/10" rounded="none" />
</Stack>
<Stack h="3" w="10" bg="graphite-black" rounded="none" border borderColor="border-gray/30" />
</Stack>
))}
</Stack>
</Box>
</Stack>
<Box h="px" bg="border-gray/30" />
<Stack h="px" bg="border-gray/30" />
<Box>
<Stack>
<Text size="xs" weight="bold" color="text-gray-500" mb={3} block className="uppercase tracking-widest">Constructors</Text>
<Stack gap={1}>
{[1, 2, 3].map((i) => (
<Box
<Stack
key={i}
position="relative"
display="flex"
@@ -92,7 +91,7 @@ export function TeamCompetitionMockup() {
borderColor="border-gray/20"
overflow="hidden"
>
<Box
<Stack
position="absolute"
left="0"
top="0"
@@ -100,23 +99,23 @@ export function TeamCompetitionMockup() {
w="0.5"
style={{ backgroundColor: teamColors[i-1] }}
/>
<Box flexGrow={1}>
<Box h="1.5" w="full" bg="white/10" rounded="none" mb={1.5} />
<Box position="relative" h="1" bg="graphite-black" rounded="none" overflow="hidden">
<Box
<Stack flexGrow={1}>
<Stack h="1.5" w="full" bg="white/10" rounded="none" mb={1.5} />
<Stack position="relative" h="1" bg="graphite-black" rounded="none" overflow="hidden">
<Stack
position="absolute"
insetY="0"
left="0"
style={{ backgroundColor: teamColors[i-1], width: `${100 - (i-1) * 15}%` }}
/>
</Box>
</Box>
</Box>
</Stack>
</Stack>
</Stack>
))}
</Stack>
</Box>
</Stack>
</Stack>
</Box>
</Stack>
);
}
@@ -151,21 +150,21 @@ export function TeamCompetitionMockup() {
};
return (
<Box position="relative" fullWidth fullHeight bg="graphite-black" rounded="none" p={{ base: 1.5, sm: 3, md: 4, lg: 6 }} overflow="hidden">
<Box display="grid" gridCols={2} gap={{ base: 2, sm: 3, md: 4, lg: 6 }} fullHeight>
<Box
<Stack position="relative" fullWidth fullHeight bg="graphite-black" rounded="none" p={{ base: 1.5, sm: 3, md: 4, lg: 6 }} overflow="hidden">
<Stack display="grid" gridCols={2} gap={{ base: 2, sm: 3, md: 4, lg: 6 }} fullHeight>
<Stack
as={motion.div}
variants={leftColumnVariants}
initial="hidden"
animate="visible"
position="relative"
>
<Box h="6" w="24" bg="panel-gray" rounded="none" mb={4} display="flex" alignItems="center" justifyContent="center" border borderColor="border-gray/30">
<Stack h="6" w="24" bg="panel-gray" rounded="none" mb={4} display="flex" alignItems="center" justifyContent="center" border borderColor="border-gray/30">
<Text size="xs" color="text-gray-400" weight="bold" className="uppercase tracking-widest">DRIVERS</Text>
</Box>
</Stack>
<Stack gap={1}>
{[1, 2, 3, 4, 5].map((i) => (
<Box
<Stack
key={i}
as={motion.div}
custom={i}
@@ -190,7 +189,7 @@ export function TeamCompetitionMockup() {
transition: { duration: 0.15 }
}}
>
<Box
<Stack
position="absolute"
left="0"
top="0"
@@ -198,7 +197,7 @@ export function TeamCompetitionMockup() {
w="0.5"
style={{ backgroundColor: teamColors[i-1] }}
/>
<Box
<Stack
h="5"
w="5"
rounded="none"
@@ -215,29 +214,29 @@ export function TeamCompetitionMockup() {
}}
>
<Text color="text-white" font="mono">{i}</Text>
</Box>
<Box flexGrow={1} minWidth="0">
<Box h="1.5" w="full" bg="white/10" rounded="none" />
</Box>
<Box h="3" w="12" bg="graphite-black" rounded="none" border borderColor="border-gray/30" />
</Box>
</Stack>
<Stack flexGrow={1} minWidth="0">
<Stack h="1.5" w="full" bg="white/10" rounded="none" />
</Stack>
<Stack h="3" w="12" bg="graphite-black" rounded="none" border borderColor="border-gray/30" />
</Stack>
))}
</Stack>
</Box>
</Stack>
<Box
<Stack
as={motion.div}
variants={rightColumnVariants}
initial="hidden"
animate="visible"
position="relative"
>
<Box h="6" w="32" bg="panel-gray" rounded="none" mb={4} display="flex" alignItems="center" justifyContent="center" border borderColor="border-gray/30">
<Stack h="6" w="32" bg="panel-gray" rounded="none" mb={4} display="flex" alignItems="center" justifyContent="center" border borderColor="border-gray/30">
<Text size="xs" color="text-gray-400" weight="bold" className="uppercase tracking-widest">CONSTRUCTORS</Text>
</Box>
</Stack>
<Stack gap={1}>
{[1, 2, 3, 4, 5].map((i) => (
<Box
<Stack
key={i}
as={motion.div}
custom={i}
@@ -262,7 +261,7 @@ export function TeamCompetitionMockup() {
transition: { duration: 0.15 }
}}
>
<Box
<Stack
position="absolute"
right="0"
top="0"
@@ -270,10 +269,10 @@ export function TeamCompetitionMockup() {
w="0.5"
style={{ backgroundColor: teamColors[i-1] }}
/>
<Box flexGrow={1} minWidth="0">
<Box h="1.5" w="full" bg="white/10" rounded="none" mb={1.5} />
<Box position="relative" h="1" bg="graphite-black" rounded="none" overflow="hidden">
<Box
<Stack flexGrow={1} minWidth="0">
<Stack h="1.5" w="full" bg="white/10" rounded="none" mb={1.5} />
<Stack position="relative" h="1" bg="graphite-black" rounded="none" overflow="hidden">
<Stack
as={motion.div}
position="absolute"
insetY="0"
@@ -283,13 +282,13 @@ export function TeamCompetitionMockup() {
animate={{ width: `${100 - (i-1) * 15}%` }}
transition={{ duration: shouldReduceMotion ? 0 : 0.8, delay: 0.4 + i * 0.05 }}
/>
</Box>
</Box>
</Box>
</Stack>
</Stack>
</Stack>
))}
</Stack>
</Box>
</Box>
</Box>
</Stack>
</Stack>
</Stack>
);
}