From 506a5ed14ede8e24941f187f0bab3025d85f77ab Mon Sep 17 00:00:00 2001 From: itsfinniii <102350242+itsfinniii@users.noreply.github.com> Date: Sun, 19 Apr 2026 18:03:32 +0200 Subject: [PATCH] Add footer to website --- astro/src/components/footer/Footer.astro | 70 +++++++++++++ astro/src/content/footer/footer.ts | 110 +++++++++++++++++++++ astro/src/graphql/footer/getFooter.graphql | 50 ++++++++++ astro/src/layouts/BlogLayout.astro | 8 +- astro/src/layouts/PhotoLayout.astro | 8 +- astro/src/layouts/ProjectLayout.astro | 8 +- astro/src/layouts/WebpageLayout.astro | 8 +- astro/src/types/footers/footer.d.ts | 44 +++++++++ 8 files changed, 298 insertions(+), 8 deletions(-) create mode 100644 astro/src/components/footer/Footer.astro create mode 100644 astro/src/content/footer/footer.ts create mode 100644 astro/src/graphql/footer/getFooter.graphql create mode 100644 astro/src/types/footers/footer.d.ts diff --git a/astro/src/components/footer/Footer.astro b/astro/src/components/footer/Footer.astro new file mode 100644 index 0000000..8082b68 --- /dev/null +++ b/astro/src/components/footer/Footer.astro @@ -0,0 +1,70 @@ +--- +import { getFooter } from "@/content/footer/footer"; +import { Image } from "astro:assets"; + +const footer = await getFooter(); +--- + + diff --git a/astro/src/content/footer/footer.ts b/astro/src/content/footer/footer.ts new file mode 100644 index 0000000..cfe5e95 --- /dev/null +++ b/astro/src/content/footer/footer.ts @@ -0,0 +1,110 @@ +import { createDirectusConnection } from "@/lib/directus"; +import { print } from 'graphql'; +import type { Footer, FooterColumn, FooterSecondaryLink, FooterSocial } from "@/types/footers/footer"; +import getFooterQuery from '@/graphql/footer/getFooter.graphql'; +import { getImageUrl } from "@/lib/images"; + +export async function getFooter(): Promise