diff --git a/src/components/listitem/ImageListItem.svelte b/src/components/listitem/ImageListItem.svelte index 6513526..02a6d0b 100644 --- a/src/components/listitem/ImageListItem.svelte +++ b/src/components/listitem/ImageListItem.svelte @@ -1,13 +1,21 @@
- {title} + {title}
{title}
-
-
{text}
+
+
{text}
+ {#if right} +
{right}
+ {/if}
\ No newline at end of file diff --git a/src/routes/playlists/[slug]/+page.server.ts b/src/routes/playlists/[slug]/+page.server.ts new file mode 100644 index 0000000..35029f0 --- /dev/null +++ b/src/routes/playlists/[slug]/+page.server.ts @@ -0,0 +1,11 @@ +import type { PageServerLoad } from './$types'; +import { listPlaylists } from "$lib/server/songs.ts"; + +// TODO: slug should be "my" or "recommended", fetch accordingly +export const load: PageServerLoad = async ({ params }) => { + const isMine = params.slug === 'my' + return { + playlists: await listPlaylists(), + isMine + } +} \ No newline at end of file diff --git a/src/routes/playlists/[slug]/+page.svelte b/src/routes/playlists/[slug]/+page.svelte new file mode 100644 index 0000000..6e70dca --- /dev/null +++ b/src/routes/playlists/[slug]/+page.svelte @@ -0,0 +1,18 @@ + + + alert('More clicked')} +]} /> + +
+ {#each data.playlists as pl} + + {/each} +
+