wip
This commit is contained in:
@@ -47,24 +47,36 @@ export default function AnimatedImage({
|
||||
return (
|
||||
<div
|
||||
ref={containerRef}
|
||||
className={`relative overflow-hidden rounded-xl shadow-lg my-12 ${className}`}
|
||||
className={`relative overflow-hidden rounded-2xl shadow-2xl my-16 group ${className}`}
|
||||
>
|
||||
<div className={`
|
||||
absolute inset-0 bg-primary/10 z-10 pointer-events-none transition-opacity duration-1000
|
||||
${isLoaded && isInView ? 'opacity-0' : 'opacity-100'}
|
||||
`} />
|
||||
|
||||
<Image
|
||||
src={src}
|
||||
alt={alt}
|
||||
width={width}
|
||||
height={height}
|
||||
className={`
|
||||
duration-1000 ease-out w-full h-auto
|
||||
${isLoaded && isInView ? 'scale-100 blur-0 opacity-100' : 'scale-110 blur-xl opacity-0'}
|
||||
duration-[1.5s] ease-out w-full h-auto transition-all
|
||||
${isLoaded && isInView ? 'scale-100 blur-0 opacity-100' : 'scale-110 blur-2xl opacity-0'}
|
||||
group-hover:scale-105
|
||||
`}
|
||||
onLoad={() => setIsLoaded(true)}
|
||||
priority={priority}
|
||||
/>
|
||||
|
||||
{/* Subtle reflection overlay */}
|
||||
<div className="absolute inset-0 bg-gradient-to-tr from-white/5 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-700 pointer-events-none" />
|
||||
|
||||
{alt && (
|
||||
<p className="text-sm text-text-secondary text-center mt-3 italic px-4 pb-4">
|
||||
{alt}
|
||||
</p>
|
||||
<div className="absolute bottom-0 left-0 right-0 p-6 bg-gradient-to-t from-black/60 to-transparent translate-y-full group-hover:translate-y-0 transition-transform duration-500">
|
||||
<p className="text-sm text-white font-medium italic">
|
||||
{alt}
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user