Scrolling behavior is still stupid
This commit is contained in:
@@ -14,25 +14,31 @@
|
|||||||
import { goto } from "$app/navigation";
|
import { goto } from "$app/navigation";
|
||||||
|
|
||||||
const dispatch = createEventDispatcher()
|
const dispatch = createEventDispatcher()
|
||||||
|
|
||||||
|
let button: HTMLButtonElement
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="flex items-center gap-1">
|
|
||||||
<button
|
<button
|
||||||
title={playlist.name}
|
|
||||||
{disabled}
|
{disabled}
|
||||||
|
bind:this={button}
|
||||||
class="relative aspect-square w-full rounded-lg bg-cover bg-center transition-all"
|
class="relative aspect-square w-full rounded-lg bg-cover bg-center transition-all"
|
||||||
style="background-image: url({playlist.thumbnail});"
|
style="background-image: url({playlist.thumbnail});"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
dispatch('click')
|
dispatch('click')
|
||||||
goto(`/library?playlist=${playlist.id}}`)
|
goto(`/library?playlist=${playlist.id}`)
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
<span class="absolute left-full top-1/2 overflow-clip text-ellipsis whitespace-nowrap rounded-md bg-gray-900 px-2 py-1 text-sm origin-left transition-transform duration-75">{playlist.name}</span>
|
||||||
</button>
|
</button>
|
||||||
<span class="translate-x-3 overflow-clip text-ellipsis whitespace-nowrap rounded-md bg-slate-600 px-2 py-1 text-sm">{playlist.name}</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
button:not(:disabled):not(:hover) {
|
button:not(:disabled):not(:hover) {
|
||||||
filter: brightness(50%);
|
filter: brightness(50%);
|
||||||
}
|
}
|
||||||
|
span {
|
||||||
|
transform: translateX(0.75rem) translateY(-50%) scale(0);
|
||||||
|
}
|
||||||
|
button:hover > span {
|
||||||
|
transform: translateX(0.75rem) translateY(-50%) scale(100%);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -68,7 +68,7 @@
|
|||||||
{/each}
|
{/each}
|
||||||
<!-- <div bind:this={indicatorBar} class="absolute left-0 w-[0.2rem] rounded-full bg-white transition-all duration-300 ease-in-out" /> -->
|
<!-- <div bind:this={indicatorBar} class="absolute left-0 w-[0.2rem] rounded-full bg-white transition-all duration-300 ease-in-out" /> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col gap-6">
|
<div class="flex flex-col gap-6 px-1">
|
||||||
{#each data.playlistTabs as playlist}
|
{#each data.playlistTabs as playlist}
|
||||||
<PlaylistTabComponent {playlist} disabled={new URLSearchParams(data.url.search).get('playlist') === playlist.id} />
|
<PlaylistTabComponent {playlist} disabled={new URLSearchParams(data.url.search).get('playlist') === playlist.id} />
|
||||||
{/each}
|
{/each}
|
||||||
|
|||||||
Reference in New Issue
Block a user