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)
+
- Once listing dates are exposed by the API, the newest - additions to the directory will appear here. -
+ ++ {{ project.short_description }} +
+