Better handle project card images over text

This commit is contained in:
2026-07-22 09:41:47 +02:00
parent db4ad73837
commit dcb344bb13
+7 -2
View File
@@ -215,14 +215,19 @@ const link = `/projects/${slugify(project.data.type)}/${slugify(project.data.slu
<Image <Image
id={`hero-image-${index}`} id={`hero-image-${index}`}
class:list={[ class:list={[
"animate-floaty absolute h-48 w-auto origin-center transform rounded object-cover shadow-lg/50 transition duration-300 ease-in-out md:group-hover:z-30 md:group-hover:scale-130 md:hover:z-40", "animate-floaty absolute origin-center transform rounded object-cover shadow-lg/50 transition duration-300 ease-in-out md:group-hover:z-30 md:group-hover:scale-130 md:hover:z-40",
translateXOptions[ translateXOptions[
Math.floor(Math.random() * translateXOptions.length) Math.floor(Math.random() * translateXOptions.length)
], ],
translateYOptions[ translateYOptions[
Math.floor(Math.random() * translateYOptions.length) Math.floor(Math.random() * translateYOptions.length)
], ],
rotateOptions[Math.floor(Math.random() * rotateOptions.length)] rotateOptions[Math.floor(Math.random() * rotateOptions.length)],
image.height === image.width
? "h-auto w-64"
: image.height > image.width
? "h-64 w-auto"
: "h-auto w-86"
]} ]}
src={image} src={image}
alt="" alt=""