Download and Rules
This commit is contained in:
27
src/pages/downloads.astro
Normal file
27
src/pages/downloads.astro
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
import PageLayout from "../layouts/PageLayout.astro";
|
||||
import {getCollection} from "astro:content";
|
||||
import {t} from "astro-i18n";
|
||||
|
||||
const downloads = await getCollection("downloads");
|
||||
---
|
||||
|
||||
<PageLayout title="Downloads">
|
||||
{downloads.map(e => (
|
||||
<div class="pt-4">
|
||||
<h1 class="font-bold text-6xl">{e.data.name}</h1>
|
||||
<div class="py-4">{t(e.data.description)}</div>
|
||||
|
||||
<div class="flex flex-col">
|
||||
{typeof e.data.url === 'object' ?
|
||||
Object.entries(e.data.url).map(value => (
|
||||
<a href={value[1]} class="text-blue-500 hover:underline w-fit">{t(value[0])}</a>
|
||||
))
|
||||
:
|
||||
<a href={e.data.url} class="text-blue-500 hover:underline w-fit">{t("Download")}</a>
|
||||
}
|
||||
{e.data.sourceUrl ? <a class="text-blue-500 hover:underline w-fit" href={e.data.sourceUrl}>Quelle</a> : null}
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</PageLayout>
|
||||
Reference in New Issue
Block a user