From 68a5c45fd5cdafbbdf1d2c84c50f33dbcaa53ccd Mon Sep 17 00:00:00 2001 From: Nathan Cummins Date: Tue, 12 Aug 2025 11:48:48 +0930 Subject: [PATCH] Add year to project cards if not ongoing --- src/assets/projects/dungeons-and-dining-tables.mdx | 1 + src/components/ProjectCard.astro | 2 +- src/content.config.ts | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/assets/projects/dungeons-and-dining-tables.mdx b/src/assets/projects/dungeons-and-dining-tables.mdx index 1ecca0a..2a30cb5 100644 --- a/src/assets/projects/dungeons-and-dining-tables.mdx +++ b/src/assets/projects/dungeons-and-dining-tables.mdx @@ -3,6 +3,7 @@ title: Dungeons and Dining Tables role: Composer and Sound Designer type: Video Game date: 2026-07-01 +ongoing: true description: "Delve dungeons to collect rare furniture, take that furniture back to your home to decorate and the cosier your house is, the higher your stats! ๐Ÿช‘๐Ÿกโš”๏ธ Go forth and drive the grumpiness from the land: Your perfect home is just a dungeon away! Oh, and you play as an Axolotl ๐Ÿฅณ" frontPage: { "order": 1 } images: diff --git a/src/components/ProjectCard.astro b/src/components/ProjectCard.astro index 945679a..83fbd76 100644 --- a/src/components/ProjectCard.astro +++ b/src/components/ProjectCard.astro @@ -130,7 +130,7 @@ const projectHasBody = project.body && project.body.trim().length > 0; >

- {projectHasBody && {project.data.title}}{!projectHasBody && project.data.title }

{project.data.title}}{!projectHasBody && project.data.title }{!project.data.ongoing && ({project.data.date.getFullYear()})}

{project.data.role} diff --git a/src/content.config.ts b/src/content.config.ts index 16f8adb..4084a47 100644 --- a/src/content.config.ts +++ b/src/content.config.ts @@ -9,6 +9,7 @@ const projects = defineCollection({ type: z.string(), date: z.date(), description: z.string(), + ongoing: z.boolean().optional().default(false), frontPage: z .object({ order: z.number()