|
| 1 | +<script setup lang="ts"> |
| 2 | +const { data: page } = await useAsyncData('community', () => queryCollection('community').first()) |
| 3 | +if (!page.value) { |
| 4 | + throw createError({ statusCode: 404, statusMessage: 'Page not found', fatal: true }) |
| 5 | +} |
| 6 | +
|
| 7 | +useSeoMeta({ |
| 8 | + titleTemplate: '%s - Nuxt UI', |
| 9 | + title: page.value.title, |
| 10 | + description: page.value.description, |
| 11 | + ogTitle: `${page.value.title} - Nuxt UI`, |
| 12 | + ogDescription: page.value.description |
| 13 | +}) |
| 14 | +
|
| 15 | +defineOgImageComponent('Docs') |
| 16 | +</script> |
| 17 | + |
| 18 | +<template> |
| 19 | + <div v-if="page"> |
| 20 | + <UPageHero |
| 21 | + :title="page.hero.title" |
| 22 | + :description="page.hero.description" |
| 23 | + class="md:border-b border-default" |
| 24 | + :ui="{ |
| 25 | + container: 'relative lg:py-32' |
| 26 | + }" |
| 27 | + > |
| 28 | + <template #top> |
| 29 | + <div class="absolute z-[-1] rounded-full bg-primary blur-[300px] size-60 sm:size-80 transform -translate-x-1/2 left-1/2 -translate-y-80" /> |
| 30 | + </template> |
| 31 | + |
| 32 | + <LazyStarsBg /> |
| 33 | + |
| 34 | + <div aria-hidden="true" class="hidden md:block absolute z-[-1] border-x border-default inset-0 mx-4 sm:mx-6 lg:mx-8" /> |
| 35 | + </UPageHero> |
| 36 | + |
| 37 | + <UPageSection :ui="{ container: '!py-0' }"> |
| 38 | + <div class="pb-16 sm:pb-24 lg:pb-32 md:border-x border-default"> |
| 39 | + <UPageGrid class="gap-px"> |
| 40 | + <UPageCard |
| 41 | + v-for="item in page.items" |
| 42 | + :key="item.label" |
| 43 | + :title="item.label" |
| 44 | + :description="item.description" |
| 45 | + :to="item.to" |
| 46 | + target="_blank" |
| 47 | + class="rounded-none group" |
| 48 | + :ui="{ footer: 'pointer-events-auto z-[1]' }" |
| 49 | + > |
| 50 | + <template #leading> |
| 51 | + <UAvatar v-bind="item.avatar" size="3xl" class="mx-auto" loading="lazy" /> |
| 52 | + </template> |
| 53 | + |
| 54 | + <template v-if="item.user" #footer> |
| 55 | + <UButton |
| 56 | + :label="item.user.name" |
| 57 | + :avatar="item.user.avatar" |
| 58 | + :to="item.user.to" |
| 59 | + target="_blank" |
| 60 | + size="sm" |
| 61 | + color="neutral" |
| 62 | + variant="outline" |
| 63 | + class="ring-default group-hover:ring-accented transition bg-transparent" |
| 64 | + /> |
| 65 | + </template> |
| 66 | + </UPageCard> |
| 67 | + </UPageGrid> |
| 68 | + </div> |
| 69 | + </UPageSection> |
| 70 | + </div> |
| 71 | +</template> |
0 commit comments