feat: tints

This commit is contained in:
tresabhi committed 2025-05-06 13:56:56 -05:00
1 parent 8649d09a94
commit c840086c11
2 files changed
+48 -11

No files matched your search

@@ -15,17 +15,54 @@ export const NATION_COLORS: Record<
{ {
text: RadixColor; text: RadixColor;
background: RadixColor[]; background: RadixColor[];
tint: RadixColor;
} }
> = { > = {
france: { text: 'mint', background: ['mint', 'cyan', 'jade'] }, france: {
germany: { text: 'sage', background: ['slate', 'sage', 'mauve'] }, text: 'mint',
usa: { text: 'gold', background: ['brown', 'gold', 'gray'] }, tint: 'purple',
european: { text: 'gold', background: ['bronze', 'gold', 'brown'] }, background: ['mint', 'cyan', 'jade'],
ussr: { text: 'bronze', background: ['bronze', 'tomato', 'bronze'] }, },
uk: { text: 'gold', background: ['bronze', 'gold', 'brown'] }, germany: {
japan: { text: 'jade', background: ['green', 'teal', 'jade'] }, text: 'sage',
china: { text: 'teal', background: ['green', 'teal', 'jade'] }, tint: 'blue',
other: { text: 'amber', background: ['amber', 'yellow', 'gray'] }, background: ['slate', 'sage', 'mauve'],
},
usa: {
text: 'gold',
tint: 'red',
background: ['brown', 'gold', 'gray'],
},
european: {
text: 'cyan',
tint: 'mint',
background: ['cyan', 'blue', 'indigo'],
},
ussr: {
text: 'bronze',
tint: 'red',
background: ['bronze', 'tomato', 'bronze'],
},
uk: {
text: 'gold',
tint: 'red',
background: ['bronze', 'gold', 'brown'],
},
japan: {
text: 'jade',
tint: 'violet',
background: ['green', 'teal', 'jade'],
},
china: {
text: 'teal',
tint: 'pink',
background: ['green', 'teal', 'jade'],
},
other: {
text: 'amber',
tint: 'sky',
background: ['amber', 'yellow', 'gray'],
},
}; };
export function Title({ outline }: TitleProps) { export function Title({ outline }: TitleProps) {
@@ -66,7 +103,7 @@ export function Title({ outline }: TitleProps) {
: `${125 / name.length}vw` : `${125 / name.length}vw`
: `${75 / name.length}vw`, : `${75 / name.length}vw`,
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
color: outline ? 'transparent' : color, color: outline ? Var(`${nationColors.tint}-a2`) : color,
WebkitTextStroke: outline WebkitTextStroke: outline
? `${revealed ? (disturbed ? '1px' : 'min(2px, 0.2vw)') : 0} ${color}` ? `${revealed ? (disturbed ? '1px' : 'min(2px, 0.2vw)') : 0} ${color}`
: undefined, : undefined,
@@ -165,7 +165,7 @@ export function HeroSection({ skeleton }: MaybeSkeletonComponentProps) {
height: '100%', height: '100%',
transitionDuration: '2s', transitionDuration: '2s',
opacity: revealed ? 1 : 0, opacity: revealed ? 1 : 0,
filter: disturbed ? undefined : `drop-shadow(0 0 1rem black)`, filter: disturbed ? undefined : `drop-shadow(0 0 2rem black)`,
}} }}
> >
<Suspense> <Suspense>