Skip to content
Snippets Groups Projects
Commit 7a72b9d9 authored by Moritz Stückler's avatar Moritz Stückler :cowboy:
Browse files

feat: footer logos collection

parent 4f769e77
No related branches found
No related tags found
1 merge request!49feat: footer logos collection
This diff is collapsed.
......@@ -78,7 +78,8 @@ const data = trimmedArticlesAndEvents.map((data) => {
customTextColor: data.frontmatter.customTextColor,
category: {
id: 2,
title: data.frontmatter.type.toLowerCase() === "article" ? "News" : "Event",
title:
data.frontmatter?.type?.toLowerCase() === "article" ? "News" : "Event",
},
};
}) as INewsCard[];
......
......@@ -14,19 +14,6 @@ const localeFromUrl =
const menuItems = buildPageTree(rawContent, baseUrl, localeFromUrl);
// const supportedBy = [
// {
// alt: "Europäischer Fonds für regionale Entwicklung",
// href: "https://www.europarl.europa.eu/factsheets/de/sheet/95/europaischer-fonds-fur-regionale-entwicklung-efre-",
// img: "images/logos/Logo_EU.svg",
// },
// {
// alt: "Hamburger Behörde für Wirtschaft und Innovation",
// href: "https://www.hamburg.de/bwi/",
// img: "images/logos/Logo_BWI.svg",
// },
// ];
const policyLinks = [
{
title: "Impressum",
......@@ -43,8 +30,12 @@ const policyLinks = [
];
const socialMedia = (await getCollection("socials")).map(
(social) => social.data
(social) => social?.data
);
const footerLogos = (await getCollection("footerLogos"))
.map((logo) => logo?.data)
.sort((a, b) => (a.order || 0) - (b.order || 0));
---
<FooterNewsletterWrapper
......@@ -53,4 +44,5 @@ const socialMedia = (await getCollection("socials")).map(
policyLinks={policyLinks}
socialMedia={socialMedia}
baseUrl={baseUrl}
supportedBy={footerLogos}
/>
......@@ -47,9 +47,19 @@ const toolbarCollection = defineCollection({
}),
});
const footerLogosCollection = defineCollection({
schema: z.object({
img: z.string(),
href: z.string().optional(),
alt: z.string().optional(),
order: z.number().optional()
}),
});
export const collections = {
people: peopleCollection,
map: mapCollection,
socials: socialsCollection,
toolbar: toolbarCollection,
footerLogos: footerLogosCollection
};
---
img: images/logos/Logo_EU.svg
alt: Europäischer Fonds für regionale Entwicklung
href: https://www.europarl.europa.eu/factsheets/de/sheet/95/europaischer-fonds-fur-regionale-entwicklung-efre-
order: 0
---
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment