Basis of blog done
This commit is contained in:
1 parent
af008c1f6f
commit
ab06eb5902
19 files changed
+15767
-15050
No files matched your search
@@ -0,0 +1,32 @@
|
||||
<script setup lang="ts">
|
||||
const route = useRoute();
|
||||
|
||||
const { data: page } = await useAsyncData("page-" + route.path, () => {
|
||||
return queryCollection("blog").path(route.path).first();
|
||||
});
|
||||
|
||||
if (!page.value) {
|
||||
throw createError({
|
||||
statusCode: 404,
|
||||
statusMessage: "Page not found",
|
||||
fatal: true,
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<article
|
||||
class="prose prose-invert prose-orange m-auto min-h-[70%] max-w-screen-lg px-12 pb-20"
|
||||
>
|
||||
<ContentRenderer v-if="page" :value="page" />
|
||||
</article>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
@import "tailwindcss";
|
||||
@plugin "@tailwindcss/typography";
|
||||
|
||||
h1 {
|
||||
@apply text-5xl font-extrabold pb-8 pt-12;
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user