src/components/page/WineCard.astro 658 B raw
1
---
2
const { wine, cellarApiUrl } = Astro.props;
3
---
4
5
<a
6
	href={`/cellar/${wine.short_id}`}
7
	class="flex items-center gap-4 py-3 border-b border-[#333] no-underline hover:opacity-70 transition-opacity"
8
>
9
	<div class="flex-shrink-0 w-20 h-20">
10
		<img
11
			src={`${cellarApiUrl}/api/wines/${wine.short_id}/pentagon.svg`}
12
			alt={`${wine.name} taste profile`}
13
			width="80"
14
			height="80"
15
			style="width:80px;height:80px;object-fit:contain;"
16
			loading="lazy"
17
		/>
18
	</div>
19
	<div class="flex flex-col gap-0.5">
20
		<span class="text-base">{wine.name}</span>
21
		<span class="text-xs opacity-50">{wine.origin}{wine.grape ? ` · ${wine.grape}` : ""}</span>
22
	</div>
23
</a>