From a9b238475b08e1b57aca0911af45fe261fa21808 Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 18 Aug 2026 09:06:06 -0700 Subject: [PATCH] Add latest projects section to HomePage and improve error handling styles --- frontend/src/pages/HomePage.vue | 87 +++++++++++++++++++++++++++------ frontend/tsconfig.app.json | 4 +- 2 files changed, 74 insertions(+), 17 deletions(-) diff --git a/frontend/src/pages/HomePage.vue b/frontend/src/pages/HomePage.vue index d725222..bfbb678 100644 --- a/frontend/src/pages/HomePage.vue +++ b/frontend/src/pages/HomePage.vue @@ -28,6 +28,23 @@ const categories = computed(() => ].sort(), ) +const latestProjects = computed(() => + projects.value + .toSorted( + (a, b) => + new Date(b.created_at).getTime() - + new Date(a.created_at).getTime(), + ) + .slice(0, 10), +) + +function formatProjectDate(date: string) { + return new Intl.DateTimeFormat('en', { + month: 'short', + year: 'numeric', + }).format(new Date(date)) +} + const visibleProjects = computed(() => { const normalizedQuery = query.value.trim().toLowerCase() @@ -183,7 +200,7 @@ onMounted(loadProjects)
{{ error }} @@ -238,7 +255,7 @@ onMounted(loadProjects)
-
-

+ - Recent listings are coming soon -

+ +
+ {{ project.name.charAt(0).toUpperCase() }} +
-

- Once listing dates are exposed by the API, the newest - additions to the directory will appear here. -

+ +
+

+ {{ project.name }} +

+ +

+ {{ project.short_description }} +

+
+ + + + + + +
diff --git a/frontend/tsconfig.app.json b/frontend/tsconfig.app.json index 196bcfa..67a43f7 100644 --- a/frontend/tsconfig.app.json +++ b/frontend/tsconfig.app.json @@ -1,9 +1,9 @@ { "compilerOptions": { - "target": "ES2022", + "target": "ES2023", "useDefineForClassFields": true, "module": "ESNext", - "lib": ["ES2022", "DOM", "DOM.Iterable"], + "lib": ["ES2023", "DOM", "DOM.Iterable"], "skipLibCheck": true, "moduleResolution": "Bundler", "allowImportingTsExtensions": false,