feat: better cache some stuff

This commit is contained in:
2023-08-09 23:51:40 +02:00
parent 6587ee689b
commit 3232f14bf7
10 changed files with 153 additions and 177 deletions

View File

@ -12,7 +12,7 @@ export function Card(
const backgroundStyle = {
backgroundImage: `url(${image})`,
backgroundSize: "cover",
boxShadow: "0px -60px 90px black inset, 0px 10px 20px #fff3 inset",
boxShadow: "0px -60px 90px black inset, 0px 10px 20px #fff1 inset",
};
if (backgroundSize !== 100) {
@ -30,11 +30,14 @@ export function Card(
sm:w-48 sm:h-48
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)" }}
/>
{!image?.includes("placeholder.svg") &&
(
<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>
{/* Recipe Card content */}