This commit is contained in:
Iliyan Angelov
2025-11-29 18:05:34 +02:00
parent 4c15d90a6a
commit d7d7a2757a

View File

@@ -273,7 +273,9 @@ const Story = () => {
</Link> </Link>
</p> </p>
<h5 className="fw-4 mt-12 mb-12 text-white"> <h5 className="fw-4 mt-12 mb-12 text-white">
{item.title} <Link href={`/case-study/${item.slug}`} className="text-white">
{item.title}
</Link>
</h5> </h5>
<p className="text-xs">{item.excerpt || item.description?.substring(0, 150) + '...'}</p> <p className="text-xs">{item.excerpt || item.description?.substring(0, 150) + '...'}</p>
</div> </div>
@@ -300,32 +302,34 @@ const Story = () => {
className={`tp-story-thumb ${isActive ? "thumb-active" : ""}`} className={`tp-story-thumb ${isActive ? "thumb-active" : ""}`}
data-loaded={isLoaded} data-loaded={isLoaded}
> >
<Image <Link href={`/case-study/${item.slug}`} className="w-100">
src={imageUrl} <Image
width={600} src={imageUrl}
height={300} width={600}
className="w-100 mh-300" height={300}
alt={item.title || "Case Study"} className="w-100 mh-300"
priority={index === 0} alt={item.title || "Case Study"}
loading={index === 0 ? 'eager' : 'lazy'} priority={index === 0}
style={{ loading={index === 0 ? 'eager' : 'lazy'}
display: 'block', style={{
width: '100%', display: 'block',
height: 'auto', width: '100%',
objectFit: 'cover', height: 'auto',
opacity: isLoaded ? 1 : 0, objectFit: 'cover',
transition: 'opacity 0.3s ease' opacity: isLoaded ? 1 : 0,
}} transition: 'opacity 0.3s ease'
onLoad={() => { }}
if (!isLoaded) { onLoad={() => {
setImagesLoaded((prev) => { if (!isLoaded) {
const newSet = new Set(prev); setImagesLoaded((prev) => {
newSet.add(index); const newSet = new Set(prev);
return newSet; newSet.add(index);
}); return newSet;
} });
}} }
/> }}
/>
</Link>
</div> </div>
); );
})} })}