-
Notifications
You must be signed in to change notification settings - Fork 178
/
Copy pathapp.vue
93 lines (88 loc) · 2.59 KB
/
app.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<script setup>
useServerSeoMeta({
ogSiteName: 'Nuxt DevTools',
twitterCard: 'summary_large_image',
})
useHead({
htmlAttrs: {
lang: 'en',
},
})
const links = [{
label: 'Documentation',
to: '/guide/getting-started',
}, {
label: 'Playground',
to: '/playground',
}, {
label: 'Releases',
to: 'https://github.com/nuxt/devtools/releases',
target: '_blank',
}]
const { data: files } = useLazyFetch('/api/search.json', {
default: () => [],
server: false,
})
const { data: navigation } = await useAsyncData('navigation', () => fetchContentNavigation())
// Provide
provide('navigation', navigation)
</script>
<template>
<UHeader :links="links">
<template #logo>
<Logo />
</template>
<template #right>
<UColorModeButton v-if="!$colorMode.forced" />
<UButton
aria-label="Nuxt Website" icon="i-simple-icons-nuxtdotjs" to="https://nuxt.com"
target="_blank" color="gray" variant="ghost"
/>
<UButton
aria-label="Nuxt on X" icon="i-simple-icons-x" to="https://x.com/nuxt_js"
target="_blank" color="gray" variant="ghost"
/>
<UButton
aria-label="Nuxt DevTools on GitHub" icon="i-simple-icons-github"
to="https://github.com/nuxt/devtools"
target="_blank" color="gray" variant="ghost"
/>
</template>
<!-- Mobile panel -->
<template v-if="$route.path !== '/'" #panel>
<LazyUContentSearchButton size="md" class="mb-4 w-full" />
<LazyUNavigationTree :links="mapContentNavigation(navigation)" default-open :multiple="false" />
</template>
</UHeader>
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
<UFooter :links="links">
<template #left>
<span class="text-sm">
Published under <NuxtLink to="https://github.com/nuxt/devtools" target="_blank" class="underline">MIT License</NuxtLink>
</span>
</template>
<template #right>
<UColorModeButton v-if="!$colorMode.forced" />
<UButton
aria-label="Nuxt Website" icon="i-simple-icons-nuxtdotjs"
to="https://nuxt.com"
target="_blank" color="gray" variant="ghost"
/>
<UButton
aria-label="Nuxt on X" icon="i-simple-icons-x"
to="https://x.com/nuxt_js"
target="_blank" color="gray" variant="ghost"
/>
<UButton
aria-label="Nuxt Devtools on GitHub" icon="i-simple-icons-github"
to="https://github.com/nuxt/devtools"
target="_blank" color="gray" variant="ghost"
/>
</template>
</UFooter>
<ClientOnly>
<LazyUContentSearch :files="files" :navigation="navigation" :links="links" />
</ClientOnly>
</template>