package list from viandwi24

This commit is contained in:
Kar
2023-04-28 09:58:09 +05:30
commit 4125135289
108 changed files with 27411 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
<script setup>
const props = defineProps({
emptyTip: {
type: String,
required: false,
default: 'This page is empty',
},
})
</script>
<template>
<ContentDoc>
<template #default="{ doc }">
<PageHeader>
<PageTitle :text="doc.title" />
</PageHeader>
<PageBody>
<PageSection>
<ContentRenderer :value="doc" />
</PageSection>
</PageBody>
</template>
<template #empty>
<h1>{{ emptyTip }}</h1>
</template>
<template #not-found>
<Error :code="404" wrap />
</template>
</ContentDoc>
</template>

View File

@@ -0,0 +1,29 @@
<script setup>
const props = defineProps({
path: {
type: String,
required: true,
},
pageTitle: {
type: String,
default: '',
},
})
const { data } = await useAsyncData(props.path, () =>
queryContent(props.path).findOne()
)
</script>
<template>
<PageWrapper>
<PageHeader>
<PageTitle :text="pageTitle" class="capitalize" />
</PageHeader>
<PageBody>
<PageSection>
<ContentRenderer :value="data" />
</PageSection>
</PageBody>
</PageWrapper>
</template>