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).
This commit is contained in:
1 parent
ebbf5a6e3a
commit
80d349e9b0
1 file changed
+4
-3
@@ -70,7 +70,7 @@
|
|||||||
let artistOverflow = $state(0);
|
let artistOverflow = $state(0);
|
||||||
const titleOffset = $derived(titleOverflow > 0 ? `-${titleOverflow + 16}px` : '0px');
|
const titleOffset = $derived(titleOverflow > 0 ? `-${titleOverflow + 16}px` : '0px');
|
||||||
const artistOffset = $derived(artistOverflow > 0 ? `-${artistOverflow + 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 titleDuration = $derived(titleOverflow > 0 ? `${(titleOverflow + 16) / tickerSpeed}s` : '0s');
|
||||||
const artistDuration = $derived(artistOverflow > 0 ? `${(artistOverflow + 16) / tickerSpeed}s` : '0s');
|
const artistDuration = $derived(artistOverflow > 0 ? `${(artistOverflow + 16) / tickerSpeed}s` : '0s');
|
||||||
|
|
||||||
@@ -424,8 +424,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@keyframes title-ticker {
|
@keyframes title-ticker {
|
||||||
from { transform: translateX(0); }
|
0%, 20% { transform: translateX(0); }
|
||||||
to { transform: translateX(var(--ticker-offset)); }
|
70%, 80% { transform: translateX(var(--ticker-offset)); }
|
||||||
|
90%, 100% { transform: translateX(0); }
|
||||||
}
|
}
|
||||||
|
|
||||||
.artist {
|
.artist {
|
||||||
|
|||||||
Reference in new issue
Block a user