File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -22,8 +22,20 @@ onMounted(() => {
2222
2323const navigation = inject <Ref <ContentNavigationItem []>>(' navigation' )
2424
25+ const githubLink = computed (() => {
26+ return ` https://github.com/nuxt/${value .value } `
27+ })
28+
2529const desktopLinks = computed (() => props .links .map (({ icon , ... link }) => link ))
26- const mobileLinks = computed (() => props .links .map (link => ({ ... link , defaultOpen: link .children && route .path .startsWith (link .to as string ) })))
30+ const mobileLinks = computed (() => [
31+ ... props .links .map (link => ({ ... link , defaultOpen: link .children && route .path .startsWith (link .to as string ) })),
32+ {
33+ label: ' Open on GitHub' ,
34+ to: githubLink .value ,
35+ icon: ' i-simple-icons-github' ,
36+ target: ' _blank'
37+ }
38+ ])
2739 </script >
2840
2941<template >
@@ -73,7 +85,7 @@ const mobileLinks = computed(() => props.links.map(link => ({ ...link, defaultOp
7385 :key =" value"
7486 color =" neutral"
7587 variant =" ghost"
76- :to =" `https://github.com/nuxt/${value}` "
88+ :to =" githubLink "
7789 target =" _blank"
7890 icon =" i-simple-icons-github"
7991 aria-label =" GitHub"
You can’t perform that action at this time.
0 commit comments