feat: add blur to movie card
This commit is contained in:
parent
5e64edef7f
commit
936ed32b11
@ -12,6 +12,7 @@ export function Card(
|
|||||||
const backgroundStyle = {
|
const backgroundStyle = {
|
||||||
backgroundImage: `url(${image})`,
|
backgroundImage: `url(${image})`,
|
||||||
backgroundSize: "cover",
|
backgroundSize: "cover",
|
||||||
|
boxShadow: "0px -60px 90px black inset, 0px 10px 20px #fff3 inset",
|
||||||
};
|
};
|
||||||
|
|
||||||
if (backgroundSize !== 100) {
|
if (backgroundSize !== 100) {
|
||||||
@ -24,11 +25,16 @@ export function Card(
|
|||||||
<a
|
<a
|
||||||
href={link}
|
href={link}
|
||||||
style={backgroundStyle}
|
style={backgroundStyle}
|
||||||
class="text-white rounded-3xl shadow-md p-4 relative overflow-hidden
|
class="text-white rounded-3xl shadow-md p-4 relative
|
||||||
lg:w-56 lg:h-56
|
lg:w-56 lg:h-56
|
||||||
sm:w-48 sm:h-48
|
sm:w-48 sm:h-48
|
||||||
w-[37vw] h-[37vw]"
|
w-[37vw] h-[37vw]"
|
||||||
>
|
>
|
||||||
|
<img
|
||||||
|
class="absolute opacity-30 top-0 left-0 object-cover w-full h-full -z-10"
|
||||||
|
src={image}
|
||||||
|
style={{ filter: "blur(30px)" }}
|
||||||
|
/>
|
||||||
<div class="h-full flex flex-col justify-between relative z-10">
|
<div class="h-full flex flex-col justify-between relative z-10">
|
||||||
<div>
|
<div>
|
||||||
{/* Recipe Card content */}
|
{/* Recipe Card content */}
|
||||||
@ -38,10 +44,7 @@ export function Card(
|
|||||||
{title}
|
{title}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div class="absolute inset-x-0 bottom-0 h-3/4" />
|
||||||
class="absolute inset-x-0 bottom-0 h-3/4"
|
|
||||||
style={{ background: "linear-gradient(transparent, #000e)" }}
|
|
||||||
/>
|
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user