Persist vinyl rotation angle across page reloads

- Save current rotation angle to localStorage every 2s and on page unload
- Restore angle on page load via CSS custom property --vinyl-offset
- Extract angle from computed transform matrix

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-27 21:06:20 +03:00
parent 397d38ac12
commit 8a8f00ff31
2 changed files with 33 additions and 2 deletions

View File

@@ -628,8 +628,8 @@ h1 {
}
@keyframes vinylSpin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
from { transform: rotate(var(--vinyl-offset, 0deg)); }
to { transform: rotate(calc(var(--vinyl-offset, 0deg) + 360deg)); }
}
.track-info {