style(player): improve progress bar aesthetics and scrubber visibility

This commit is contained in:
2026-05-01 18:35:52 +02:00
committed by Mikkel Elvers
parent b1079d974b
commit b86fa9d291
2 changed files with 5 additions and 7 deletions

View File

@@ -88,11 +88,11 @@
<span data-preview-time>0:00</span>
</div>
<div class="relative flex h-1.5 w-full items-center rounded-full bg-white/20 transition-all group-hover/progress:h-2">
<div data-buffered class="absolute left-0 top-0 h-full rounded-full bg-white/30 z-0" style="width: 0%"></div>
<div data-progress class="bg-accent relative z-10 h-full rounded-full" style="width: 0%"></div>
<div data-buffered class="absolute left-0 top-0 h-full rounded-full bg-white/40 z-0 transition-all duration-200" style="width: 0%"></div>
<div data-progress class="bg-accent absolute left-0 top-0 z-10 h-full rounded-full" style="width: 0%"></div>
<div data-segments class="absolute inset-0 z-20 pointer-events-none overflow-hidden rounded-full"></div>
</div>
<div data-scrubber class="bg-accent pointer-events-none absolute top-1/2 z-30 h-3.5 w-3.5 -translate-x-1/2 -translate-y-1/2 rounded-full opacity-0 shadow-sm transition-[opacity,transform] group-hover/progress:scale-110 group-hover/progress:opacity-100" style="left: 0%"></div>
<div data-scrubber class="bg-accent pointer-events-none absolute top-1/2 z-30 h-3.5 w-3.5 -translate-x-1/2 -translate-y-1/2 rounded-full shadow-sm transition-[transform] group-hover/progress:scale-125" style="left: 0%"></div>
</div>
<span class="w-12 text-center" data-duration>0:00</span>
</div>