Update SlideFactory to set image URL to null, modify SlideResource to make image field optional, and adjust Slider components to display a default image when no URL is provided

This commit is contained in:
F4ilji
2025-08-12 14:50:23 +05:00
parent 06c23edad9
commit 478be2e212
4 changed files with 4 additions and 5 deletions
@@ -15,7 +15,7 @@
data-nimg="fill"
class="object-cover rounded-xl transition-opacity duration-1000 absolute inset-0 h-full w-full"
sizes="100vw"
:src="'/storage/' + slide.image.url"
:src="slide.image.url ? '/storage/' + slide.image.url : 'img/thumbnail-3.png'"
:class="{ 'opacity-1': currentIndex === index, 'opacity-0': currentIndex !== index }"
/>
</a>
@@ -15,7 +15,7 @@
data-nimg="fill"
class="object-cover transition-opacity duration-1000 absolute inset-0 h-full w-full"
sizes="100vw"
:src="'/storage/' + slide.image.url"
:src="slide.image.url ? '/storage/' + slide.image.url : 'img/thumbnail-3.png'"
:loading="index === 0 ? 'eager' : 'lazy'"
:class="{ 'opacity-1': currentIndex === index, 'opacity-0': currentIndex !== index }"
/>