File tree Expand file tree Collapse file tree 2 files changed +22
-4
lines changed
Expand file tree Collapse file tree 2 files changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -230,7 +230,7 @@ async function generateNav (): Promise<NavItem[]> {
230230 pages . get ( key ) ! . push ( pageInfo )
231231 }
232232
233- standalonePages . push ( { item : { name : 'Playground' , to : '/playground ' } , order : 1.6 } )
233+ standalonePages . push ( { item : { name : 'Playground' , to : 'https://v0play.vuetifyjs.com ' } , order : 1.6 } )
234234
235235 const nav : NavItem [ ] = [ ]
236236 const sectionEntries = Object . entries ( SECTIONS ) . toSorted ( ( a , b ) => a [ 1 ] . order - b [ 1 ] . order )
Original file line number Diff line number Diff line change 5050 return ' expand'
5151 })
5252
53- const isActive = toRef (() => to && (route .path === to || route .path .startsWith (` ${to }/ ` )))
53+ const isExternal = toRef (() => !! to ?.startsWith (' http' ))
54+ const isActive = toRef (() => ! isExternal .value && to && (route .path === to || route .path .startsWith (` ${to }/ ` )))
5455 // Check children Map directly for reactivity
5556 const childIds = toRef (() => navNested .nested .children .get (id ) ?? [])
5657 const hasChildren = toRef (() => childIds .value .length > 0 )
148149 <!-- Dash prefix for top-level solo links (only when collapsible nav is enabled) -->
149150 <span v-else-if =" isTopLevel && !navConfig.flatMode.value" aria-hidden =" true" class =" size-5 shrink-0 flex items-center justify-center text-divider" >–</span >
150151
151- <!-- Link (navigable) -->
152+ <!-- External link -->
152153 <Atom
153- v-if =" to"
154+ v-if =" to && isExternal"
155+ as =" a"
156+ class =" font-semibold icon-text flex-1 min-w-0"
157+ :class =" [
158+ 'hover:underline hover:text-primary focus-visible:underline focus-visible:text-primary',
159+ !isTopLevel && !hasChildren && 'opacity-70 hover:opacity-100 focus-visible:opacity-100',
160+ ]"
161+ :href =" to"
162+ rel =" noopener"
163+ target =" _blank"
164+ >
165+ <span class =" truncate" >{{ name }}</span >
166+ <span v-if =" emphasized" class =" w-2 h-2 rounded-[2px] shrink-0" :class =" devmode ? 'bg-error' : 'bg-success'" />
167+ </Atom >
168+
169+ <!-- Internal link (navigable) -->
170+ <Atom
171+ v-else-if =" to"
154172 :aria-current =" isActive ? 'page' : undefined"
155173 :as
156174 class =" font-semibold icon-text flex-1 min-w-0"
You can’t perform that action at this time.
0 commit comments