SERIOUS messing around with the navbar

This commit is contained in:
Eclypsed
2024-01-28 02:41:13 -05:00
parent bee4c903ec
commit 5bd5b603b0
7 changed files with 200 additions and 146 deletions

View File

@@ -0,0 +1,55 @@
import type { LayoutLoad } from './$types'
export interface Tab {
type: 'nav' | 'playlist'
pathname: string
name: string
icon: string
button?: HTMLButtonElement
}
export const load: LayoutLoad = ({ url }) => {
const navTabs: Tab[] = [
{
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[] = [
{
type: 'playlist',
pathname: '/library?playlist=AD:TRANCE 10',
name: 'AD:TRANCE 10',
icon: 'https://www.diverse.direct/wp/wp-content/uploads/470_artwork.jpg',
},
{
type: 'playlist',
pathname: '/library?playlist=Fionaredica',
name: 'Fionaredica',
icon: 'https://f4.bcbits.com/img/a2436961975_10.jpg',
},
]
return { tabs: navTabs.concat(playlistTabs) }
}