From 54309d06cf6d4570116a1b361e5df05b2be8fc3c Mon Sep 17 00:00:00 2001 From: Eclypsed Date: Sat, 20 Jan 2024 16:41:53 -0500 Subject: [PATCH] Layout is looking pretty slick now! --- src/lib/components/media/miniPlayer.svelte | 118 ++++++++--------- src/lib/components/utility/searchBar.svelte | 8 +- src/routes/(app)/+layout.svelte | 134 +++++++++++--------- src/routes/(app)/search/+page.svelte | 1 + 4 files changed, 138 insertions(+), 123 deletions(-) create mode 100644 src/routes/(app)/search/+page.svelte diff --git a/src/lib/components/media/miniPlayer.svelte b/src/lib/components/media/miniPlayer.svelte index 38a2833..20cea9f 100644 --- a/src/lib/components/media/miniPlayer.svelte +++ b/src/lib/components/media/miniPlayer.svelte @@ -17,71 +17,73 @@ {#if song && displayMode === 'horizontal'} -
-
- {song.name} thumbnail -
- {song.name} - - {#each song.artists as artist} - {@const listIndex = song.artists.indexOf(artist)} - {artist.name} - {#if listIndex === song.artists.length - 2} - & - {:else if listIndex < song.artists.length - 2} - , - {/if} - {/each} - -
- -
-
-
+
+
+
+ {song.name} thumbnail +
+ {song.name} + + {#each song.artists as artist} + {@const listIndex = song.artists.indexOf(artist)} + {artist.name} + {#if listIndex === song.artists.length - 2} + & + {:else if listIndex < song.artists.length - 2} + , + {/if} + {/each} + +
+ +
+
+
+ + + + (songPlaying = !songPlaying)}> + + + ($currentlyPlaying = null)}> + + + + + +
+
+
0:00
+ +
{formatDuration(song.duration)}
+
+
+
+ - - - (songPlaying = !songPlaying)}> - - - ($currentlyPlaying = null)}> - + - + -
-
-
0:00
- -
{formatDuration(song.duration)}
-
-
-
- - - - - - - - - - - (fullplayerOpen = !fullplayerOpen)}> - - -
+ + + + (fullplayerOpen = !fullplayerOpen)}> + + + +
{:else if song && displayMode === 'vertical'}
-
+
{song.name} thumbnail
diff --git a/src/lib/components/utility/searchBar.svelte b/src/lib/components/utility/searchBar.svelte index 28c7b78..7d0d1a4 100644 --- a/src/lib/components/utility/searchBar.svelte +++ b/src/lib/components/utility/searchBar.svelte @@ -24,7 +24,7 @@ { setTimeout(() => { // This is a completely stupid thing you have to do, if there is not timeout, the active element will be the body of the document and not the newly focused element @@ -68,9 +68,3 @@
{/if} - - diff --git a/src/routes/(app)/+layout.svelte b/src/routes/(app)/+layout.svelte index f1aece9..5680b7b 100644 --- a/src/routes/(app)/+layout.svelte +++ b/src/routes/(app)/+layout.svelte @@ -1,5 +1,4 @@ -
- -
- -
- 768 ? 'horizontal' : 'vertical'} /> - {#if $pageWidth < 768} -

+
+ +
{#each Object.entries(contentTabs) as [page, tabData]} - + {#if data.url === page} + + {:else} + + {/if} {/each} -

- {/if} -
-
+ {#if data.url in contentTabs} +
+ {/if} +
+ +
+{/if}