refactor
This commit is contained in:
17
web/src/components/albums/albumCard.astro
Normal file
17
web/src/components/albums/albumCard.astro
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
import { authPB } from "@utils/pocketbase"
|
||||
const { a } = Astro.props
|
||||
const pb = await authPB()
|
||||
---
|
||||
|
||||
<div class="swiper-slide flex flex-col md:flex-row items-center justify-center">
|
||||
<a class="b1-no-underline" href={`/albums/${encodeURI(a.title)}`}>
|
||||
<h1 class="flex-2 text-center pb-0 md:flex-1">{a.title}</h1>
|
||||
<p class="flex-2 text-center md:flex-1">{a.date}</p>
|
||||
<img
|
||||
src={pb.files.getURL(a, a.images[0])}
|
||||
class="flex-1 md:flex-2 w-full h-full object-contain"
|
||||
alt={a.title}
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
Reference in New Issue
Block a user