add project page

This commit is contained in:
2025-10-14 13:37:02 +07:00
parent 6ddbb80335
commit 6c5118d757
4 changed files with 166 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
<template>
<template v-if="project">
<NuxtLink class="project-card" :to="project?.path">
<img :src="project?.logo" :alt="project?.title + 's cover image'"/>
<div class="project-card-content">
<h3 :title="project?.title">{{ project?.title }}</h3>
<p style="margin-block: 0.25em" :title="project?.description">{{ project?.description }}</p>
<p class="post-more-info" :title="useFormatDate(project?.dateUpdated)">📅 {{ useRelativeDate(project?.dateUpdated) }}</p>
</div>
</NuxtLink>
</template>
</template>
<script setup lang="ts">
const config = useRuntimeConfig();
const baseUrl = config.public.baseUrl
import { useFormatDate } from '~/composables/formatDate';
import { useRelativeDate } from '~/composables/relativeDate';
import type { ProjectsCollectionItem } from '@nuxt/content'
defineProps<{
project: ProjectsCollectionItem
}>()
</script>