+
- {#each data.tabs.filter((tab) => tab.type === 'nav') as nav, index}
-
+ {#each data.navTabs as nav}
+
{/each}
-
+
-
@@ -138,19 +113,4 @@
/> -->
-{/if}
-
-
+{/if}
\ No newline at end of file
diff --git a/src/routes/(app)/+layout.ts b/src/routes/(app)/+layout.ts
index ec78f46..3d5f127 100644
--- a/src/routes/(app)/+layout.ts
+++ b/src/routes/(app)/+layout.ts
@@ -1,91 +1,83 @@
import type { LayoutLoad } from './$types'
-
-export interface Tab {
- type: 'nav' | 'playlist'
- pathname: string
- name: string
- icon: string
- button?: HTMLButtonElement
-}
+import type { NavTab } from '$lib/components/navbar/navTab.svelte'
+import type { PlaylistTab } from '$lib/components/navbar/playlistTab.svelte'
export const load: LayoutLoad = () => {
- const navTabs: Tab[] = [
+ const navTabs: NavTab[] = [
{
- type: 'nav',
pathname: '/',
name: 'Home',
icon: 'fa-solid fa-house',
},
{
- type: 'nav',
pathname: '/user',
name: 'User',
icon: 'fa-solid fa-user', // This would be a cool spot for a user-uploaded pfp
},
{
- type: 'nav',
pathname: '/search',
name: 'Search',
icon: 'fa-solid fa-search',
},
{
- type: 'nav',
pathname: '/library',
name: 'Libray',
icon: 'fa-solid fa-bars-staggered',
},
]
- const playlistTabs: Tab[] = [
+ const playlistTabs: PlaylistTab[] = [
{
- type: 'playlist',
- pathname: '/library?playlist=AD:TRANCE 10',
+ id: 'AD:TRANCE 10',
name: 'AD:TRANCE 10',
- icon: 'https://www.diverse.direct/wp/wp-content/uploads/470_artwork.jpg',
+ thumbnail: 'https://www.diverse.direct/wp/wp-content/uploads/470_artwork.jpg',
},
{
- type: 'playlist',
- pathname: '/library?playlist=Fionaredica',
+ id: 'Fionaredica',
name: 'Fionaredica',
- icon: 'https://f4.bcbits.com/img/a2436961975_10.jpg',
+ thumbnail: 'https://f4.bcbits.com/img/a2436961975_10.jpg',
},
{
- type: 'playlist',
- pathname: '/library?playlist=Machinate',
+ id: 'Machinate',
name: 'Machinate',
- icon: 'https://f4.bcbits.com/img/a3587136348_10.jpg',
+ thumbnail: 'https://f4.bcbits.com/img/a3587136348_10.jpg',
},
{
- type: 'playlist',
- pathname: '/library?playlist=MAGGOD',
+ id: 'MAGGOD',
name: 'MAGGOD',
- icon: 'https://f4.bcbits.com/img/a3641603617_10.jpg',
+ thumbnail: 'https://f4.bcbits.com/img/a3641603617_10.jpg',
},
{
- type: 'playlist',
- pathname: '/library?playlist=The Requiem',
+ id: 'The Requiem',
name: 'The Requiem',
- icon: 'https://f4.bcbits.com/img/a2458067285_10.jpg',
+ thumbnail: 'https://f4.bcbits.com/img/a2458067285_10.jpg',
},
{
- type: 'playlist',
- pathname: '/library?playlist=IRREPARABLE HARDCORE IS BACK 2 -Horai Gekka-',
+ id: 'IRREPARABLE HARDCORE IS BACK 2 -Horai Gekka-',
name: 'IRREPARABLE HARDCORE IS BACK 2 -Horai Gekka-',
- icon: 'https://f4.bcbits.com/img/a1483629734_10.jpg',
+ thumbnail: 'https://f4.bcbits.com/img/a1483629734_10.jpg',
},
{
- type: 'playlist',
- pathname: '/library?playlist=妄殺オタクティクス',
+ id: '妄殺オタクティクス',
name: '妄殺オタクティクス',
- icon: 'https://f4.bcbits.com/img/a1653481367_10.jpg',
+ thumbnail: 'https://f4.bcbits.com/img/a1653481367_10.jpg',
},
{
- type: 'playlist',
- pathname: '/library?playlist=Collapse',
+ id: 'Collapse',
name: 'Collapse',
- icon: 'https://f4.bcbits.com/img/a0524413952_10.jpg',
+ thumbnail: 'https://f4.bcbits.com/img/a0524413952_10.jpg',
+ },
+ {
+ id: 'Fleurix',
+ name: 'Fleurix',
+ thumbnail: 'https://f4.bcbits.com/img/a1856993876_10.jpg',
+ },
+ {
+ id: '天才失格 -No Longer Prodigy-',
+ name: '天才失格 -No Longer Prodigy-',
+ thumbnail: 'https://f4.bcbits.com/img/a2186643420_10.jpg',
},
]
- return { tabs: navTabs.concat(playlistTabs) }
+ return { navTabs, playlistTabs }
}