do not show image carousel arrows if only one image is present
This commit is contained in:
@@ -71,20 +71,22 @@
|
||||
>
|
||||
{/each}
|
||||
</div>
|
||||
<div class="absolute top-0 left-2 h-full flex items-center">
|
||||
<button
|
||||
class="backdrop-invert-75 w-10 h-10 rounded-full flex justify-center items-center cursor-pointer z-20"
|
||||
aria-label="previous"
|
||||
onclick={scrollPrev}><span class="iconify iconify-[heroicons--chevron-left] w-2/5 h-2/5"></span></button
|
||||
>
|
||||
</div>
|
||||
<div class="absolute top-0 right-2 h-full flex items-center">
|
||||
<button
|
||||
class="backdrop-invert-75 w-10 h-10 rounded-full flex justify-center items-center cursor-pointer z-20"
|
||||
aria-label="next"
|
||||
onclick={scrollNext}><span class="iconify iconify-[heroicons--chevron-right] w-2/5 h-2/5"></span></button
|
||||
>
|
||||
</div>
|
||||
{#if images.length > 1}
|
||||
<div class="absolute top-0 left-2 h-full flex items-center">
|
||||
<button
|
||||
class="backdrop-invert-75 w-10 h-10 rounded-full flex justify-center items-center cursor-pointer z-20"
|
||||
aria-label="previous"
|
||||
onclick={scrollPrev}><span class="iconify iconify-[heroicons--chevron-left] w-2/5 h-2/5"></span></button
|
||||
>
|
||||
</div>
|
||||
<div class="absolute top-0 right-2 h-full flex items-center">
|
||||
<button
|
||||
class="backdrop-invert-75 w-10 h-10 rounded-full flex justify-center items-center cursor-pointer z-20"
|
||||
aria-label="next"
|
||||
onclick={scrollNext}><span class="iconify iconify-[heroicons--chevron-right] w-2/5 h-2/5"></span></button
|
||||
>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user