File tree 2 files changed +27
-6
lines changed
2 files changed +27
-6
lines changed Original file line number Diff line number Diff line change @@ -59,17 +59,38 @@ onMounted(async () => {
59
59
ready .value = true
60
60
})
61
61
})
62
+
63
+ const { copy } = useClipboard ()
64
+ const toast = useToast ()
65
+ const logo = useTemplateRef (' logo' )
66
+ const logoContextMenuItems = [
67
+ [{
68
+ label: ' Copy logo as SVG' ,
69
+ icon: ' i-simple-icons-nuxtdotjs' ,
70
+ onSelect() {
71
+ if (logo .value ) {
72
+ copy (logo .value .$el .outerHTML )
73
+ toast .add ({
74
+ title: ' NuxtHub logo copied as SVG' ,
75
+ description: ' You can now paste it into your project' ,
76
+ icon: ' i-lucide-circle-check' ,
77
+ color: ' success'
78
+ })
79
+ }
80
+ }
81
+ }]
82
+ ]
62
83
</script >
63
84
64
85
<template >
65
86
<UHeader >
66
87
<template #left >
67
- <div class = " inline-flex items-end gap-2 " >
68
- <NuxtLink to =" /" aria-label = " NuxtHub " >< HubLogo class = " h-6 " /></ NuxtLink >
69
- < UBadge variant = " subtle " size = " sm " class =" relative top-[2px] " >
70
- beta
71
- </UBadge >
72
- </div >
88
+ <UContextMenu :items = " logoContextMenuItems " size = " xs " >
89
+ <NuxtLink to =" /" class = " inline-flex items-end gap-2 " aria-label = " Back to home " >
90
+ < HubLogo ref = " logo " class =" h-6 " / >
91
+ < UBadge label = " beta" variant = " subtle " size = " sm " class = " -mb-[2px] font-semibold text-[12px]/3 " />
92
+ </NuxtLink >
93
+ </UContextMenu >
73
94
</template >
74
95
75
96
<UNavigationMenu :items =" links.map(({ icon, ...link }) => link)" variant =" link" :ui =" { link: 'text-(--ui-text-highlighted) hover:text-(--ui-primary) data-active:text-(--ui-primary)' }" />
You can’t perform that action at this time.
0 commit comments