@@ -7,14 +7,13 @@ interface Props {
77 title: string ;
88 width? : number ;
99 height? : number ;
10- animate? : boolean ;
1110 class? : string ;
1211}
1312
14- const { imageLayers, title, width, height, animate, class : className } = Astro .props ;
13+ const { imageLayers, title, width, height, class : className } = Astro .props ;
1514---
1615
17- <div class:list ={ [" overlay-container" , animate ? " animate " : undefined , className ]} >
16+ <div class:list ={ [" overlay-container" , className ]} >
1817 { imageLayers .map ((img , index ) => (
1918 <CardContent translateZ = { (imageLayers .length * - 5 ) + (index + 1 ) * 10 } >
2019 <Image
@@ -23,7 +22,6 @@ const { imageLayers, title, width, height, animate, class: className } = Astro.p
2322 width = { width }
2423 height = { height }
2524 transition :name = { ` recipe-image-${title }-${index } ` }
26- class = { ` recipe-image-layer-${index } ` }
2725 />
2826 </CardContent >
2927 ))}
@@ -49,39 +47,4 @@ const { imageLayers, title, width, height, animate, class: className } = Astro.p
4947 object-position: center;
5048 transition: transform .2s;
5149 }
52-
53- .animate {
54- img {
55- animation: MoveUpDown 5s ease infinite;
56- }
57-
58- .recipe-image-layer-0 {
59- --move-distance: 10px;
60- animation-delay: 0s;
61- }
62-
63- .recipe-image-layer-1 {
64- --move-distance: 8px;
65- animation-delay: -0.4s;
66- }
67-
68- .recipe-image-layer-2 {
69- --move-distance: 7px;
70- animation-delay: -0.8s;
71- }
72-
73- .recipe-image-layer-3 {
74- --move-distance: 6px;
75- animation-delay: -1.2s;
76- }
77-
78- @keyframes MoveUpDown {
79- 0%, 100% {
80- transform: translateY(0);
81- }
82- 50% {
83- transform: translateY(var(--move-distance));
84- }
85- }
86- }
8750</style >
0 commit comments