| 
 | 1 | +<script setup lang="ts">  | 
 | 2 | +const colorMode = useColorMode()  | 
 | 3 | +
  | 
 | 4 | +const color = computed(() => colorMode.value === 'dark' ? '#111827' : 'white')  | 
 | 5 | +
  | 
 | 6 | +useHead({  | 
 | 7 | +  meta: [  | 
 | 8 | +    { charset: 'utf-8' },  | 
 | 9 | +    { name: 'viewport', content: 'width=device-width, initial-scale=1' },  | 
 | 10 | +    { key: 'theme-color', name: 'theme-color', content: color }  | 
 | 11 | +  ],  | 
 | 12 | +  link: [  | 
 | 13 | +    { rel: 'icon', href: '/favicon.ico' }  | 
 | 14 | +  ],  | 
 | 15 | +  htmlAttrs: {  | 
 | 16 | +    lang: 'en'  | 
 | 17 | +  }  | 
 | 18 | +})  | 
 | 19 | +
  | 
 | 20 | +useSeoMeta({  | 
 | 21 | +  titleTemplate: '%s - Nuxt UI Pro - SaaS template',  | 
 | 22 | +  ogImage: 'https://saas-template.nuxt.dev/social-card.png',  | 
 | 23 | +  twitterImage: 'https://saas-template.nuxt.dev/social-card.png',  | 
 | 24 | +  twitterCard: 'summary_large_image'  | 
 | 25 | +})  | 
 | 26 | +
  | 
 | 27 | +const { data: navigation } = await useAsyncData('navigation', () => queryCollectionNavigation('docs'), {  | 
 | 28 | +  transform: data => data.find(item => item.path === '/docs')?.children || []  | 
 | 29 | +})  | 
 | 30 | +const { data: files } = useLazyAsyncData('search', () => queryCollectionSearchSections('docs'), {  | 
 | 31 | +  server: false  | 
 | 32 | +})  | 
 | 33 | +
  | 
 | 34 | +const links = [{  | 
 | 35 | +  label: 'Docs',  | 
 | 36 | +  icon: 'i-lucide-book',  | 
 | 37 | +  to: '/docs/getting-started'  | 
 | 38 | +}, {  | 
 | 39 | +  label: 'Pricing',  | 
 | 40 | +  icon: 'i-lucide-credit-card',  | 
 | 41 | +  to: '/pricing'  | 
 | 42 | +}, {  | 
 | 43 | +  label: 'Blog',  | 
 | 44 | +  icon: 'i-lucide-pencil',  | 
 | 45 | +  to: '/blog'  | 
 | 46 | +}]  | 
 | 47 | +
  | 
 | 48 | +provide('navigation', navigation)  | 
 | 49 | +</script>  | 
 | 50 | + | 
 | 51 | +<template>  | 
 | 52 | +  <UApp>  | 
 | 53 | +    <NuxtLoadingIndicator />  | 
 | 54 | + | 
 | 55 | +    <NuxtLayout>  | 
 | 56 | +      <NuxtPage />  | 
 | 57 | +    </NuxtLayout>  | 
 | 58 | + | 
 | 59 | +    <ClientOnly>  | 
 | 60 | +      <LazyUContentSearch  | 
 | 61 | +        :files="files"  | 
 | 62 | +        shortcut="meta_k"  | 
 | 63 | +        :navigation="navigation"  | 
 | 64 | +        :links="links"  | 
 | 65 | +        :fuse="{ resultLimit: 42 }"  | 
 | 66 | +      />  | 
 | 67 | +    </ClientOnly>  | 
 | 68 | +  </UApp>  | 
 | 69 | +</template>  | 
0 commit comments