feat: add titles to navigation
This commit is contained in:
parent
e8e6ce3eba
commit
14cdb06e15
@ -2,12 +2,14 @@
|
||||
import { page } from '$app/stores';
|
||||
|
||||
export let href: string;
|
||||
export let title: string = '';
|
||||
|
||||
$: isOnPage = href === $page.route.id;
|
||||
</script>
|
||||
|
||||
<a
|
||||
{href}
|
||||
{title}
|
||||
class="btn py-2 px-2.5 {isOnPage ? 'variant-ghost-primary' : 'hover:variant-soft-primary'}"
|
||||
>
|
||||
<slot />
|
||||
|
@ -4,11 +4,12 @@
|
||||
import IconSettings from '~icons/mdi/settings';
|
||||
import IconArtist from '~icons/mdi/artist';
|
||||
import IconAlbum from '~icons/mdi/album';
|
||||
import IconPlaylist from '~icons/mdi/playlist-music';
|
||||
</script>
|
||||
|
||||
<nav class="flex">
|
||||
<Link href="/"><IconMusic class="w-7 h-7" /></Link>
|
||||
<Link href="/albums"><IconAlbum class="w-7 h-7" /></Link>
|
||||
<Link href="/artists"><IconArtist class="w-7 h-7" /></Link>
|
||||
<Link href="/settings"><IconSettings class="w-7 h-7" /></Link>
|
||||
<Link title="tracks" href="/"><IconMusic class="w-7 h-7" /></Link>
|
||||
<Link title="albums" href="/albums"><IconAlbum class="w-7 h-7" /></Link>
|
||||
<Link title="artists" href="/artists"><IconArtist class="w-7 h-7" /></Link>
|
||||
<Link title="settings" href="/settings"><IconSettings class="w-7 h-7" /></Link>
|
||||
</nav>
|
||||
|
@ -33,7 +33,7 @@
|
||||
</script>
|
||||
|
||||
{#if $playingNow !== null}
|
||||
<div class="flex gap-2">
|
||||
<div class="flex gap-2 z-10">
|
||||
<audio
|
||||
id="audio-source"
|
||||
src={audioUrl}
|
||||
@ -43,7 +43,7 @@
|
||||
autoplay
|
||||
/>
|
||||
<button
|
||||
class="z-10 relative placeholder w-12 h-12"
|
||||
class="relative placeholder w-12 h-12"
|
||||
on:pointerenter={(_) => (showIcon = true)}
|
||||
on:pointerleave={(_) => (showIcon = false)}
|
||||
on:click={(_) => {
|
||||
|
@ -65,8 +65,8 @@
|
||||
<AppShell>
|
||||
<svelte:fragment slot="footer">
|
||||
<div class="w-screen">
|
||||
<div class="card fixed z-[1] mr-4 bottom-14 right-0"><Navbar /></div>
|
||||
<div class="card rounded-none fixed z-[1] w-full bottom-0 flex items-center h-12">
|
||||
<div class="card fixed mr-4 bottom-14 right-0"><Navbar /></div>
|
||||
<div class="card rounded-none fixed w-full bottom-0 flex items-center h-12">
|
||||
<PlayingNow />
|
||||
<div class="ml-auto">volume</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user