Refactor
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user