TOPVERSE_Official/pages/release/[id].vue

29 lines
817 B
Vue
Raw Normal View History

2023-05-05 17:23:07 +08:00
<script setup>
const route = useRoute()
const { locale } = useI18n()
2023-05-16 21:18:46 +08:00
const path = `/${locale.value}/${route.params.id}`
2023-05-05 17:23:07 +08:00
const { data } = await useAsyncData(`content-${path}`, () => {
return queryContent().where({ _path: path }).findOne()
})
</script>
<template>
2023-05-16 21:18:46 +08:00
<SectionBanner :img="data?.img" :title="data?.title" :topic="data?.topic" :description="data?.description" font-bold text-white />
<main class="m-auto prose xl:max-w-900px">
2023-05-05 17:23:07 +08:00
<ContentRenderer v-if="data" :value="data" />
</main>
2023-06-01 15:36:34 +08:00
<div class="m-auto my-30 flex flex-col text-right text-right prose xl:max-w-900px">
2023-05-26 14:21:14 +08:00
<span class="text-lg font-bold">
2023-05-25 18:00:00 +08:00
{{ data?.author }}
</span>
2023-05-26 14:21:14 +08:00
<small class="opacity-80">
2023-05-25 18:00:00 +08:00
{{ data?.resume }}
2023-05-26 14:21:14 +08:00
</small>
<span class="pt-5">
2023-05-25 18:00:00 +08:00
{{ data?.publish }}
</span>
</div>
2023-05-05 17:23:07 +08:00
</template>