fix(youtube-gallery): remove crossfade flash on carousel navigation
The carousel iframe row was wrapped in {#key currentIndex} with
transition:fade, so switching slides (or navigating to the page) faded
the old and new row in overlap — briefly showing two rows / a blink.
Drop the fade from both iframe containers, matching the modal variant
which uses {#key} without a transition.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -280,7 +280,7 @@
|
|||||||
<div class="grid grid-cols-1 gap-4 md:grid-cols-2">
|
<div class="grid grid-cols-1 gap-4 md:grid-cols-2">
|
||||||
{#key currentIndex}
|
{#key currentIndex}
|
||||||
{@const current = items[currentIndex]}
|
{@const current = items[currentIndex]}
|
||||||
<div class="aspect-video w-full overflow-hidden rounded-xs bg-stein-100" transition:fade={{ duration: 150 }}>
|
<div class="aspect-video w-full overflow-hidden rounded-xs bg-stein-100">
|
||||||
<iframe
|
<iframe
|
||||||
title={current.video.title ?? t(T.youtube_title_fallback)}
|
title={current.video.title ?? t(T.youtube_title_fallback)}
|
||||||
src={current.embedUrl}
|
src={current.embedUrl}
|
||||||
@@ -291,7 +291,7 @@
|
|||||||
></iframe>
|
></iframe>
|
||||||
</div>
|
</div>
|
||||||
{#if second}
|
{#if second}
|
||||||
<div class="hidden md:block aspect-video w-full overflow-hidden rounded-xs bg-stein-100" transition:fade={{ duration: 150 }}>
|
<div class="hidden md:block aspect-video w-full overflow-hidden rounded-xs bg-stein-100">
|
||||||
<iframe
|
<iframe
|
||||||
title={second.video.title ?? t(T.youtube_title_fallback)}
|
title={second.video.title ?? t(T.youtube_title_fallback)}
|
||||||
src={second.embedUrl}
|
src={second.embedUrl}
|
||||||
|
|||||||
Reference in New Issue
Block a user