This commit is contained in:
2023-12-05 17:36:31 +01:00
parent 89e6f9cff4
commit 0fc220ce94
25 changed files with 607 additions and 342 deletions

View File

@@ -2,6 +2,7 @@
import PageLayout from "../layouts/PageLayout.astro";
import {getCollection} from "astro:content";
import {t} from "astro-i18n";
import {l} from "../util/util";
const downloads = await getCollection("downloads");
---
@@ -15,7 +16,7 @@ const downloads = await getCollection("downloads");
<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={value[1].startsWith("/") ? l(value[1]) : 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>