Add animation to cards in homepage
This commit is contained in:
parent
094fc38cec
commit
0e3926c740
@ -35,14 +35,14 @@ export function Card(props: {value: number}) {
|
||||
}
|
||||
|
||||
return (
|
||||
<div class={"inline-block w-16 h-24 border-2 border-c-border-1 relative"}
|
||||
<button class={"inline-block w-16 h-24 border-2 border-c-border-1 relative select-none"}
|
||||
style={{"color": textColor, "background-color": bgColor}}
|
||||
>
|
||||
<span class="absolute top-1 left-1 font-bold text-4xl font-sans-serif">
|
||||
{cardValue}
|
||||
</span>
|
||||
{icon}
|
||||
</div>
|
||||
</button>
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -92,27 +92,17 @@ export function Index() {
|
||||
Go to game rules
|
||||
</A>
|
||||
</div>
|
||||
<div class="h-16" />
|
||||
<div class="text-center">
|
||||
<div class="inline-block -rotate-6 translate-x-2 translate-y-1">
|
||||
<div class="text-center py-8">
|
||||
<div class="inline-block -rotate-6 translate-x-2 translate-y-1 hover:-translate-y-2 transition-transform">
|
||||
<Card value={38} />
|
||||
</div>
|
||||
<div class="inline-block">
|
||||
<div class="inline-block hover:-translate-y-2 transition-transform">
|
||||
<Card value={4} />
|
||||
</div>
|
||||
<div class="inline-block rotate-6 -translate-x-2 translate-y-1">
|
||||
<div class="inline-block rotate-6 -translate-x-2 translate-y-1 hover:-translate-y-2 transition-transform">
|
||||
<Card value={36} />
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<Card value={64} />
|
||||
<Card value={96} />
|
||||
<Card value={128} />
|
||||
<Card value={160} />
|
||||
<Card value={192} />
|
||||
<Card value={224} />
|
||||
<Card value={256} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user