From c74299c2b1e6bbdda1dff419eaac4d5d6351f95d Mon Sep 17 00:00:00 2001 From: Nathan Cummins Date: Mon, 25 Aug 2025 17:49:45 +0930 Subject: [PATCH] Add links and key figures to project pages --- src/pages/projects/[...slug].astro | 52 +++++++++++++++++++++++++++--- 1 file changed, 48 insertions(+), 4 deletions(-) diff --git a/src/pages/projects/[...slug].astro b/src/pages/projects/[...slug].astro index d06f54c..b4f5e1c 100644 --- a/src/pages/projects/[...slug].astro +++ b/src/pages/projects/[...slug].astro @@ -2,6 +2,9 @@ import ImageCarousel from "@components/ImageCarousel.astro"; import MainLayout from "@layouts/MainLayout.astro"; +import TextLink from "@components/TextLink.astro"; + +import { Icon } from "astro-icon/components"; import { getCollection, render } from "astro:content"; import { @@ -9,7 +12,7 @@ import { getFullExternalURLOfImage, getProjectHero, slugify -} from "@/lib/utils"; +} from "@lib/utils"; export async function getStaticPaths() { const projects = await getCollection("projects", ({ body }) => { @@ -71,15 +74,56 @@ import P from "@components/MDX/P.astro"; >
-
-

+
+

{project.data.title}

-
+
{project.data.role} | {project.data.type}
+ { + project.data.keyFigure && project.data.keyFigure.length > 0 && ( +
+ {project.data.keyFigure.map((figure) => { + return ( +
+ {figure.title}: + + {figure.href && ( + + {figure.name} + + )} + {!figure.href && figure.name} + +
+ ); + })} +
+ ) + } + { + project.data.externalLinks !== undefined && ( + + {project.data.externalLinks.map((link) => ( + + + + ))} + + ) + }