mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
feat: even coooooooooler animations
This commit is contained in:
1 parent
20c839394a
commit
28e2139683
2 files changed
+34
-13
No files matched your search
@@ -1,7 +1,15 @@
|
|||||||
import { style } from '@vanilla-extract/css';
|
import { style } from '@vanilla-extract/css';
|
||||||
import { theme } from '../../../stitches.config';
|
import { theme } from '../../../stitches.config';
|
||||||
|
|
||||||
export const listing = style({});
|
export const listing = style({
|
||||||
|
transition: `background-position ${theme.durations.regular}`,
|
||||||
|
|
||||||
|
backgroundPosition: 'left center',
|
||||||
|
|
||||||
|
':hover': {
|
||||||
|
backgroundPosition: '-256px center',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
export const listingShadow = style({
|
export const listingShadow = style({
|
||||||
boxShadow: `inset 0 -128px 128px -128px ${theme.colors.appBackground1}`,
|
boxShadow: `inset 0 -128px 128px -128px ${theme.colors.appBackground1}`,
|
||||||
@@ -22,9 +30,10 @@ export const listingLabel = style({
|
|||||||
|
|
||||||
export const listingImage = style({
|
export const listingImage = style({
|
||||||
transition: `transform ${theme.durations.regular}`,
|
transition: `transform ${theme.durations.regular}`,
|
||||||
transform: 'translateX(25%) translateY(0)',
|
position: 'absolute',
|
||||||
|
left: '50%',
|
||||||
|
|
||||||
[`.${listing}:hover &, .${listing}:active &`]: {
|
[`.${listing}:hover &, .${listing}:active &`]: {
|
||||||
transform: 'translateX(25%) translateY(10%)',
|
transform: 'translate(-25%, 10%)',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -154,26 +154,38 @@ export default function Page() {
|
|||||||
flex: 1,
|
flex: 1,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Card className={styles.listing}>
|
<Card
|
||||||
|
className={styles.listing}
|
||||||
|
style={{
|
||||||
|
backgroundImage: `url(https://i.imgur.com/Iho9ATV.png)`,
|
||||||
|
backgroundSize: 'contain',
|
||||||
|
backgroundRepeat: 'no-repeat',
|
||||||
|
}}
|
||||||
|
>
|
||||||
<Inset
|
<Inset
|
||||||
key={tank.id}
|
key={tank.id}
|
||||||
style={{
|
style={{
|
||||||
minHeight: 128,
|
|
||||||
minWidth: 256,
|
minWidth: 256,
|
||||||
|
minHeight: 128,
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
alignItems: 'center',
|
|
||||||
justifyContent: 'center',
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<img
|
<div
|
||||||
className={styles.listingImage}
|
|
||||||
src={tankIcon(tank.id)}
|
|
||||||
style={{
|
style={{
|
||||||
objectFit: 'contain',
|
width: 256,
|
||||||
objectPosition: 'left center',
|
height: 128,
|
||||||
}}
|
}}
|
||||||
/>
|
className={styles.listingImage}
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
src={tankIcon(tank.id)}
|
||||||
|
style={{
|
||||||
|
objectFit: 'contain',
|
||||||
|
objectPosition: 'left center',
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
className={styles.listingShadow}
|
className={styles.listingShadow}
|
||||||
|
|||||||
Reference in new issue
Block a user