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

@@ -1,8 +1,7 @@
import { Box } from '@/ui/Box';
import { Image } from '@/ui/Image';
import { Stack } from '@/ui/Stack';
import { Image } from '@/ui/Image';
import { Text } from '@/ui/Text';
interface PodiumDriver {
@@ -21,8 +20,8 @@ interface RankingsPodiumProps {
export function RankingsPodium({ podium, onDriverClick }: RankingsPodiumProps) {
return (
<Box mb={10}>
<Box display="flex" alignItems="end" justifyContent="center" gap={4}>
<Stack mb={10}>
<Stack display="flex" alignItems="end" justifyContent="center" gap={4}>
{[1, 0, 2].map((index) => {
const driver = podium[index];
if (!driver) return null;
@@ -35,7 +34,7 @@ export function RankingsPodium({ podium, onDriverClick }: RankingsPodiumProps) {
}[position] || { height: '6rem', color: 'rgba(217, 119, 6, 0.2)', borderColor: 'rgba(217, 119, 6, 0.4)', crown: '#d97706' };
return (
<Box
<Stack
key={driver.id}
as="button"
type="button"
@@ -47,8 +46,8 @@ export function RankingsPodium({ podium, onDriverClick }: RankingsPodiumProps) {
border={false}
cursor="pointer"
>
<Box position="relative" mb={4}>
<Box
<Stack position="relative" mb={4}>
<Stack
position="relative"
w={position === 1 ? '24' : '20'}
h={position === 1 ? '24' : '20'}
@@ -65,8 +64,8 @@ export function RankingsPodium({ podium, onDriverClick }: RankingsPodiumProps) {
height={112}
objectFit="cover"
/>
</Box>
<Box
</Stack>
<Stack
position="absolute"
bottom="-2"
left="50%"
@@ -88,8 +87,8 @@ export function RankingsPodium({ podium, onDriverClick }: RankingsPodiumProps) {
}}
>
{position}
</Box>
</Box>
</Stack>
</Stack>
<Text weight="semibold" color="text-white" size={position === 1 ? 'lg' : 'base'} mb={1} block>
{driver.name}
@@ -111,7 +110,7 @@ export function RankingsPodium({ podium, onDriverClick }: RankingsPodiumProps) {
</Stack>
</Stack>
<Box
<Stack
mt={4}
w={position === 1 ? '28' : '24'}
h={config.height}
@@ -131,11 +130,11 @@ export function RankingsPodium({ podium, onDriverClick }: RankingsPodiumProps) {
<Text weight="bold" size={position === 1 ? '4xl' : '3xl'} color={config.crown === '#facc15' ? 'text-warning-amber' : config.crown === '#d1d5db' ? 'text-gray-300' : 'text-orange-600'}>
{position}
</Text>
</Box>
</Box>
</Stack>
</Stack>
);
})}
</Box>
</Box>
</Stack>
</Stack>
);
}