File tree Expand file tree Collapse file tree 7 files changed +130
-208
lines changed Expand file tree Collapse file tree 7 files changed +130
-208
lines changed Original file line number Diff line number Diff line change 1
1
@import "tailwindcss" ;
2
- @import "@nuxt/ui-pro " ;
2
+ @import "@nuxt/ui" ;
Original file line number Diff line number Diff line change 1
1
<script setup lang="ts">
2
2
import type { NavItem } from ' @nuxt/contents'
3
3
4
- inject <NavItem []>(' navigation' , [] )
4
+ const navigation = inject <Ref < NavItem []>> (' navigation' )
5
5
// const { metaSymbol } = useShortcuts()
6
6
const { header } = useAppConfig ()
7
+ const route = useRoute ()
7
8
const links = [
8
9
{
9
10
label: ' Guides' ,
@@ -18,6 +19,11 @@ const links = [
18
19
to: ' /learn' ,
19
20
},
20
21
]
22
+
23
+ const navItems = computed (() => {
24
+ const v = route .path .startsWith (' /docs' ) ? navigation ?.value ?.[0 ] : navigation ?.value ?.[1 ]
25
+ return v ?.children || []
26
+ })
21
27
</script >
22
28
23
29
<template >
@@ -47,5 +53,21 @@ const links = [
47
53
/>
48
54
</template >
49
55
</template >
56
+
57
+ <template #body >
58
+ <UNavigationMenu
59
+ :items =" links"
60
+ orientation =" vertical"
61
+ class =" -mx-2.5"
62
+ />
63
+ <template v-if =" route .path .startsWith (' /docs/' )" >
64
+ <UContentNavigation
65
+ :key =" route.path"
66
+ :collapsible =" false"
67
+ :navigation =" navItems"
68
+ highlight
69
+ />
70
+ </template >
71
+ </template >
50
72
</UHeader >
51
73
</template >
Original file line number Diff line number Diff line change @@ -11,17 +11,23 @@ const navItems = computed(() => {
11
11
</script >
12
12
13
13
<template >
14
- <div class =" relative mb-20" >
15
- <svg viewBox="0 0 1440 181" fill="none" xmlns="http://www.w3.org/2000/svg" class="text-blue-900/20 pointer-events-none absolute w-full top-[1px] transition-all text-sky-400 flex-shrink-0 duration-[400ms] opacity-30 z-20"><mask id="path-1-inside-1_414_5526" fill="white"><path d="M0 0H1440V181H0V0Z" /></mask><path d="M0 0H1440V181H0V0Z" fill="url(#paint0_linear_414_5526)" fill-opacity="0.22" /><path d="M0 2H1440V-2H0V2Z" fill="url(#paint1_linear_414_5526)" mask="url(#path-1-inside-1_414_5526)" /><defs><linearGradient id="paint0_linear_414_5526" x1="720" y1="0" x2="720" y2="181" gradientUnits="userSpaceOnUse"><stop stop-color="currentColor" /><stop offset="1" stop-color="currentColor" stop-opacity="0" /></linearGradient><linearGradient id="paint1_linear_414_5526" x1="0" y1="90.5" x2="1440" y2="90.5" gradientUnits="userSpaceOnUse"><stop stop-color="currentColor" stop-opacity="0" /><stop offset="0.395" stop-color="currentColor" /><stop offset="1" stop-color="currentColor" stop-opacity="0" /></linearGradient></defs></svg>
16
- <div class =" px-10 pt-10 pt-1" >
17
- <div class =" flex gap-10" >
18
- <UAside class =" w-[300px] pt-10" >
19
- <UContentNavigation :navigation =" navItems" highlight />
20
- </UAside >
21
- <div class =" xl:ml-[100px] max-w-[45rem]" >
22
- <slot />
23
- </div >
24
- </div >
25
- </div >
26
- </div >
14
+ <UMain class =" relative mb-20" >
15
+ <svg viewBox =" 0 0 1440 181" fill =" none" xmlns =" http://www.w3.org/2000/svg" class =" pointer-events-none absolute w-full top-[1px] transition-all text-sky-400 flex-shrink-0 duration-[400ms] opacity-30 z-20" ><mask id =" path-1-inside-1_414_5526" fill =" white" ><path d =" M0 0H1440V181H0V0Z" /></mask ><path d =" M0 0H1440V181H0V0Z" fill =" url(#paint0_linear_414_5526)" fill-opacity =" 0.22" /><path d =" M0 2H1440V-2H0V2Z" fill =" url(#paint1_linear_414_5526)" mask =" url(#path-1-inside-1_414_5526)" /><defs ><linearGradient id =" paint0_linear_414_5526" x1 =" 720" y1 =" 0" x2 =" 720" y2 =" 181" gradientUnits =" userSpaceOnUse" ><stop stop-color =" currentColor" /><stop offset =" 1" stop-color =" currentColor" stop-opacity =" 0" /></linearGradient ><linearGradient id =" paint1_linear_414_5526" x1 =" 0" y1 =" 90.5" x2 =" 1440" y2 =" 90.5" gradientUnits =" userSpaceOnUse" ><stop stop-color =" currentColor" stop-opacity =" 0" /><stop offset =" 0.395" stop-color =" currentColor" /><stop offset =" 1" stop-color =" currentColor" stop-opacity =" 0" /></linearGradient ></defs ></svg >
16
+ <UContainer >
17
+ <UPage >
18
+ <template #left >
19
+ <UPageAside >
20
+ <UContentNavigation
21
+ :key =" route.path"
22
+ :collapsible =" false"
23
+ :navigation =" navItems"
24
+ highlight
25
+ />
26
+ </UPageAside >
27
+ </template >
28
+
29
+ <slot />
30
+ </UPage >
31
+ </UContainer >
32
+ </UMain >
27
33
</template >
Original file line number Diff line number Diff line change @@ -340,7 +340,7 @@ const contributors = useRuntimeConfig().public.contributors
340
340
</div>
341
341
</div>
342
342
</div>
343
- <UButtonGroup class="mb-4 flex" :orientation="btnGroupOrientation">
343
+ <UFieldGroup class="mb-4 flex" :orientation="btnGroupOrientation">
344
344
<UButton :variant="webVital === 'fcp' ? 'solid' : 'soft'" :active="webVital === 'fcp'" @click="webVital = 'fcp'">
345
345
First Contentful Paint
346
346
</UButton>
@@ -350,7 +350,7 @@ const contributors = useRuntimeConfig().public.contributors
350
350
<UButton :variant="webVital === 'si' ? 'solid' : 'soft'" :active="webVital === 'si'" @click="webVital = 'si'">
351
351
Speed Index
352
352
</UButton>
353
- </UButtonGroup >
353
+ </UFieldGroup >
354
354
<p class="text-gray-500 dark:text-gray-400">
355
355
<span class="opacity-50 text-sm">*Note that PageSpeed Insights lab data is a snapshot from a particular day, which tends to be variable. We will be updating this section with aggregated results and/or field data from production usage as soon as it's available.</span>
356
356
</p>
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import NuxtScripts from '../src/module'
6
6
// https://nuxt.com/docs/api/configuration/nuxt-config
7
7
export default defineNuxtConfig ( {
8
8
modules : [
9
- '@nuxt/ui-pro ' ,
9
+ '@nuxt/ui' ,
10
10
'@nuxt/fonts' ,
11
11
'@vueuse/nuxt' ,
12
12
NuxtScripts ,
Original file line number Diff line number Diff line change 17
17
"@nuxt/fonts" : " ^0.11.4" ,
18
18
"@nuxt/image" : " ^1.11.0" ,
19
19
"@nuxt/scripts" : " workspace:*" ,
20
- "@nuxt/ui-pro " : " ^3.3.4 " ,
20
+ "@nuxt/ui" : " 4.0.0-alpha.2 " ,
21
21
"@nuxthq/studio" : " ^2.2.1" ,
22
22
"@nuxtjs/seo" : " ^3.2.2" ,
23
23
"@vueuse/core" : " ^13.9.0" ,
You can’t perform that action at this time.
0 commit comments