personal-website/src/components/SingleCompositionCard.astro
Cyril Šebek da21c622e8
Some checks failed
Build Docker Image and Deploy / Build Image and push to Registry (push) Failing after 43s
Build Docker Image and Deploy / Deploy on webserver (push) Has been skipped
New composition and chores
- chore: update @astrojs
- fix: changed rendering type from 'hybrid' to 'static' as they were merged in @astrojs v5.0
- new: new composition - Space Experiments
2024-12-14 19:39:48 +01:00

40 lines
1.1 KiB
Plaintext

---
export const prerender = false;
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from "../components/ui/card";
import { Separator } from "../components/ui/separator";
import { getLangFromUrl, useTranslations } from "../i18n/utils";
const t = useTranslations(getLangFromUrl(Astro.url));
const { song } = Astro.props;
---
<Card>
<CardHeader>
<img
src={song.data.image.url}
alt={song.data.image.alt}
class="rounded-md"
/>
<span class="py-2"></span>
<CardTitle>{song.data.name[getLangFromUrl(Astro.url)]}</CardTitle>
<CardDescription>
{song.data.publishDate.toLocaleString(Astro.currentLocale)}
<br />
<br />
{song.data.comment[Astro.currentLocale]}
</CardDescription>
</CardHeader>
<CardContent className="flex justify-evenly">
<a href={song.data.pdfLink} download>{t("music")["downloadPDF"]}</a>
<Separator orientation="vertical" className="mx-2 h-full"/>
<a href={song.data.mp3Link} download>{t("music")["downloadMP3"]}</a>
<Separator orientation="vertical" className="mx-2 h-full"/>
<a href={song.data.flacLink} download>{t("music")["downloadFLAC"]}</a>
</CardContent>
</Card>