2024-09-27 16:28:40 +00:00
|
|
|
<template>
|
|
|
|
<v-container class="px-12 docs-page-container">
|
|
|
|
<div class="docs-container">
|
|
|
|
<div class="docs-content">
|
|
|
|
<div class="mt-5">
|
|
|
|
<div class="flex gap-2 items-center">
|
|
|
|
<v-icon :icon="page.icon ?? 'mdi-text-box'" size="28" />
|
|
|
|
<h1 class="text-2xl">{{ page.title }}</h1>
|
|
|
|
</div>
|
|
|
|
<p>{{ page.description }}</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<article class="text-base prose xl:text-lg docs-article">
|
|
|
|
<content-renderer :value="page">
|
|
|
|
<content-renderer-markdown :value="page" />
|
|
|
|
</content-renderer>
|
|
|
|
</article>
|
|
|
|
</div>
|
|
|
|
|
2024-09-28 07:30:13 +00:00
|
|
|
<v-navigation-drawer app v-model="drawerOpen" floating location="right" width="300">
|
|
|
|
<div class="h-[60px] flex justify-center items-center">
|
|
|
|
<v-tabs v-model="drawerTab" hide-slider align-tabs="center">
|
|
|
|
<v-tab :value="1">
|
|
|
|
<v-icon icon="mdi-table-of-contents" />
|
|
|
|
</v-tab>
|
|
|
|
</v-tabs>
|
|
|
|
</div>
|
2024-09-28 05:29:05 +00:00
|
|
|
|
|
|
|
<v-divider class="border-opacity-50 mb-1" />
|
|
|
|
|
|
|
|
<v-tabs-window v-model="drawerTab">
|
|
|
|
<v-tabs-window-item :value="1">
|
|
|
|
<docs-table-of-contents v-if="page.body.toc.links?.length > 0" :links="page.body.toc.links" />
|
|
|
|
<v-empty-state v-else text="No Headers Available" />
|
|
|
|
</v-tabs-window-item>
|
|
|
|
</v-tabs-window>
|
|
|
|
</v-navigation-drawer>
|
|
|
|
|
|
|
|
<v-fab
|
|
|
|
app
|
|
|
|
appear
|
|
|
|
location="bottom end"
|
|
|
|
variant="plain"
|
|
|
|
:key="'docs-fab-'+drawerOpen"
|
|
|
|
:icon="drawerOpen ? 'mdi-arrow-collapse-right' : 'mdi-menu'"
|
|
|
|
@click="drawerOpen = !drawerOpen"
|
|
|
|
/>
|
2024-09-27 16:28:40 +00:00
|
|
|
</div>
|
|
|
|
</v-container>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
2024-09-28 05:29:05 +00:00
|
|
|
import { definePageMeta } from "#imports"
|
|
|
|
|
2024-09-27 16:28:40 +00:00
|
|
|
const route = useRoute()
|
|
|
|
|
|
|
|
const { t } = useI18n()
|
|
|
|
const { data: page } = await useAsyncData<any>("page", queryContent(route.path).where({ _locale: getLocale() }).findOne)
|
|
|
|
|
2024-09-28 05:29:05 +00:00
|
|
|
const drawerTab = ref(0)
|
|
|
|
const drawerOpen = ref(false)
|
|
|
|
|
2024-09-27 16:28:40 +00:00
|
|
|
if (page.value == null) {
|
|
|
|
throw createError({
|
|
|
|
status: 404,
|
|
|
|
statusMessage: "Document Page Not Found",
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2024-09-28 05:29:05 +00:00
|
|
|
definePageMeta({
|
|
|
|
layout: "docs",
|
|
|
|
})
|
|
|
|
|
2024-09-27 16:28:40 +00:00
|
|
|
useHead({
|
|
|
|
title: page.value.title,
|
|
|
|
titleTemplate: "%s | Solsynth Knowledge Base",
|
|
|
|
})
|
|
|
|
|
|
|
|
useSeoMeta({
|
|
|
|
title: page.value.title,
|
|
|
|
ogTitle: page.value.title,
|
|
|
|
description: page.value.description,
|
|
|
|
ogDescription: page.value.description,
|
|
|
|
ogUrl: `${useRuntimeConfig().public.siteUrl}${route.fullPath}`,
|
|
|
|
publisher: "Solar Archive",
|
|
|
|
ogSiteName: "Solsynth Capital",
|
|
|
|
})
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
.docs-article {
|
|
|
|
padding-bottom: 2rem;
|
|
|
|
}
|
|
|
|
|
2024-09-28 05:29:05 +00:00
|
|
|
.docs-content {
|
|
|
|
max-width: 75ch;
|
|
|
|
margin: 0 auto;
|
2024-09-27 16:28:40 +00:00
|
|
|
}
|
|
|
|
</style>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
.docs-article img {
|
|
|
|
border-radius: 8px;
|
2024-09-28 07:10:43 +00:00
|
|
|
border: 1px solid #eee;
|
|
|
|
transition: box-shadow .3s ease-in-out;
|
|
|
|
}
|
|
|
|
|
|
|
|
.docs-article img:hover {
|
|
|
|
box-shadow: 2px 2px 2px rgba(0, 0, 0, .2);;
|
2024-09-27 16:28:40 +00:00
|
|
|
}
|
|
|
|
|
2024-09-28 05:29:05 +00:00
|
|
|
|
2024-09-27 16:28:40 +00:00
|
|
|
html, body, .v-application, .docs-article {
|
|
|
|
scroll-behavior: smooth;
|
|
|
|
}
|
|
|
|
</style>
|