diff --git a/web/src/components/albums/albumCard.astro b/web/src/components/albums/albumCard.astro new file mode 100644 index 0000000..080b811 --- /dev/null +++ b/web/src/components/albums/albumCard.astro @@ -0,0 +1,17 @@ +--- +import { authPB } from "@utils/pocketbase" +const { a } = Astro.props +const pb = await authPB() +--- + +
+ +

{a.title}

+

{a.date}

+ {a.title} +
+
\ No newline at end of file diff --git a/web/src/pages/albums/index.astro b/web/src/pages/albums/index.astro index 63b739f..92d4009 100644 --- a/web/src/pages/albums/index.astro +++ b/web/src/pages/albums/index.astro @@ -1,6 +1,7 @@ --- import Base from "@layout/Base"; import { authPB } from "@utils/pocketbase"; +import AlbumCard from "@components/albums/albumCard"; export const prerender = false const pb = await authPB() @@ -20,39 +21,25 @@ const albums = await pb.collection('albums').getFullList({ slidesPerView: 1, spaceBetween: 0, speed: 400, + loop: true, keyboard: { enabled: true, onlyInViewport: false, - }, - loop: true, + } } ) - +
- { - albums.map(a => ( - - )) - } + { albums.map(a => ) }