This commit is contained in:
2025-12-27 19:35:39 +08:00
parent 8121b74649
commit e2b1e21153
18 changed files with 470 additions and 96 deletions

View File

@@ -1,24 +1,25 @@
<script setup>
import { ref, onMounted } from "vue";
import { useRoute } from "vue-router";
import TechInfo from "~/components/main/TechInfo.vue";
const content = ref(null);
onMounted(async () => {
const route = useRoute();
const { data: pageData } = await useAsyncData(route.path, () =>
queryCollection("content").path(route.path).first(),
);
if (pageData.value) {
content.value = pageData.value;
}
});
const route = useRoute();
const { data: content } = await useAsyncData(route.path, () => queryCollection("about").first());
</script>
<template>
<div class="prose prose-lg dark:prose-invert mx-auto px-6 max-w-4xl mt-0 text-left">
<ContentRenderer v-if="content" :value="content" />
<div class="container mx-auto mt-10 px-6 max-w-6xl">
<div class="flex gap-8">
<!-- Main content -->
<main class="prose prose-zinc dark:prose-invert mx-auto mt-10 px-6 w-half h-full text-left">
<ContentRenderer v-if="content" :value="content" />
</main>
<!-- Sidebar tech/build info -->
<aside class="w-1/3 hidden lg:block">
<div class="sticky top-24">
<TechInfo />
</div>
</aside>
</div>
</div>
</template>