2023-12-19 18:43:42 +01:00
|
|
|
<script lang="ts" setup>
|
|
|
|
import type { Project } from '~/types'
|
|
|
|
|
|
|
|
definePageMeta({
|
|
|
|
layout: 'detail',
|
|
|
|
})
|
|
|
|
|
|
|
|
const route = useRoute()
|
|
|
|
const dataStore = useData()
|
|
|
|
const { getProjectById } = dataStore
|
|
|
|
const { projects } = storeToRefs(dataStore)
|
|
|
|
const project = ref<Project>()
|
|
|
|
|
|
|
|
await until(projects).toMatch(p => p?.length > 0)
|
|
|
|
project.value = getProjectById<Project>(route.params.id as string)
|
|
|
|
if (!project.value) {
|
|
|
|
throw createError({
|
|
|
|
statusCode: 404,
|
|
|
|
message: 'Project not found',
|
|
|
|
fatal: true,
|
|
|
|
})
|
|
|
|
}
|
2023-12-22 14:02:31 +01:00
|
|
|
useHead({
|
|
|
|
title: project.value.name,
|
|
|
|
})
|
|
|
|
useSeoMeta({
|
|
|
|
ogTitle: project.value.name,
|
|
|
|
ogDescription: project.value.description,
|
2023-12-22 14:07:51 +01:00
|
|
|
ogImage: project.value?.logos?.at(0)?.url ?? '',
|
2023-12-22 14:02:31 +01:00
|
|
|
})
|
2023-12-19 18:43:42 +01:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<div v-if="project">
|
2024-09-12 11:56:16 +02:00
|
|
|
<div
|
|
|
|
app-container
|
|
|
|
px-16px
|
|
|
|
>
|
2024-09-02 15:13:43 +02:00
|
|
|
<div
|
|
|
|
flex
|
|
|
|
flex-col
|
|
|
|
gap-48px
|
|
|
|
mt-54px
|
|
|
|
>
|
2023-12-19 18:43:42 +01:00
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<ProjectHeading :project="project" />
|
|
|
|
<ProjectOpeness :project="project" />
|
|
|
|
<ProjectTechnology :project="project" />
|
|
|
|
<ProjectPrivacy :project="project" />
|
|
|
|
<ProjectSecurity :project="project" />
|
2024-09-27 12:14:49 +02:00
|
|
|
<ProjectHistory
|
|
|
|
v-if="project.history"
|
|
|
|
:project="project"
|
|
|
|
/>
|
2023-12-19 18:43:42 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<Footer />
|
|
|
|
</div>
|
|
|
|
</template>
|