diff --git a/src/components/appbar/AppBar.svelte b/src/components/appbar/AppBar.svelte index f3042a0..3b6f826 100644 --- a/src/components/appbar/AppBar.svelte +++ b/src/components/appbar/AppBar.svelte @@ -6,8 +6,9 @@ onclick: () => void } - let { title, account, right }: { + let { title, sub, account, right }: { title?: string + sub?: string account?: () => void right?: Icon[] } = $props() @@ -19,10 +20,12 @@ {:else} history.back()} aria-label="Account" /> {/if} -
{title}
- - - +
+
{title}
+ {#if sub} +
{sub}
+ {/if} +
{#each right as item} diff --git a/src/routes/playlists/[slug]/+page.svelte b/src/routes/playlists/[slug]/+page.svelte index 6e70dca..dc01112 100644 --- a/src/routes/playlists/[slug]/+page.svelte +++ b/src/routes/playlists/[slug]/+page.svelte @@ -7,12 +7,15 @@ import ImageListItem from "../../../components/listitem/ImageListItem.svelte"; alert('More clicked')} ]} />
{#each data.playlists as pl} - + + + {/each}
diff --git a/src/routes/song/[slug]/+page.server.ts b/src/routes/song/[slug]/+page.server.ts new file mode 100644 index 0000000..e8e01db --- /dev/null +++ b/src/routes/song/[slug]/+page.server.ts @@ -0,0 +1,10 @@ +import type { PageServerLoad } from './$types' +import { getLyricsProcessed, getSongMeta, listPlaylists, parseBrief } from "$lib/server/songs.ts"; + +export const load: PageServerLoad = async ({ params }) => { + const songId = +params.slug + const raw = await getSongMeta(songId) + const brief = parseBrief(raw) + const lrc = await getLyricsProcessed(songId) + return { raw, brief, lrc } +} \ No newline at end of file diff --git a/src/routes/song/[slug]/+page.svelte b/src/routes/song/[slug]/+page.svelte new file mode 100644 index 0000000..9eac205 --- /dev/null +++ b/src/routes/song/[slug]/+page.svelte @@ -0,0 +1,12 @@ + + + a.name).join(", ") + " - " + data.brief.album} right={[ + // TODO + {icon: "i-material-symbols:more-vert", onclick: () => alert('More clicked')} +]} /> + diff --git a/src/style/m3-alias.sass b/src/style/m3-alias.sass new file mode 100644 index 0000000..d6185a1 --- /dev/null +++ b/src/style/m3-alias.sass @@ -0,0 +1,5 @@ +.bg-inverse-primary + background-color: rgb(var(--m3-scheme-inverse-primary) / 1) + +.fg-on-primary-container + color: rgb(var(--m3-scheme-on-primary-container) / 1) \ No newline at end of file