From 80d349e9b027e51906d3ad094fc9cb8eb5fe104f Mon Sep 17 00:00:00 2001 From: vicrodh <103399283+vicrodh@users.noreply.github.com> Date: Mon, 19 Jan 2026 13:43:07 -0600 Subject: [PATCH] Apply improved ticker animation to album cards (same as badge tooltip) Changes: - Reduced speed from 80 to 40 pixels per second for better readability - Added typewriter-style animation with pauses and fast return - Slow scroll (50% of time), pause, then quick return (10% of time) IMPORTANT FOR MERGE: If this conflicts with other branches modifying the same animation, THIS VERSION should be kept as it provides better UX (tested and approved by user). --- src/lib/components/AlbumCard.svelte | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/components/AlbumCard.svelte b/src/lib/components/AlbumCard.svelte index 37009311b..72310e1a0 100644 --- a/src/lib/components/AlbumCard.svelte +++ b/src/lib/components/AlbumCard.svelte @@ -70,7 +70,7 @@ let artistOverflow = $state(0); const titleOffset = $derived(titleOverflow > 0 ? `-${titleOverflow + 16}px` : '0px'); const artistOffset = $derived(artistOverflow > 0 ? `-${artistOverflow + 16}px` : '0px'); - const tickerSpeed = 80; + const tickerSpeed = 40; const titleDuration = $derived(titleOverflow > 0 ? `${(titleOverflow + 16) / tickerSpeed}s` : '0s'); const artistDuration = $derived(artistOverflow > 0 ? `${(artistOverflow + 16) / tickerSpeed}s` : '0s'); @@ -424,8 +424,9 @@ } @keyframes title-ticker { - from { transform: translateX(0); } - to { transform: translateX(var(--ticker-offset)); } + 0%, 20% { transform: translateX(0); } + 70%, 80% { transform: translateX(var(--ticker-offset)); } + 90%, 100% { transform: translateX(0); } } .artist {