Skip to content

Commit 50e1cef

Browse files
committed
right clicking on the logo sends to branding page
1 parent 620a9f3 commit 50e1cef

File tree

1 file changed

+11
-1
lines changed
  • packages/frontendmu-nuxt/components/site

1 file changed

+11
-1
lines changed

packages/frontendmu-nuxt/components/site/Menu.vue

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
import { computed, onMounted } from 'vue';
33
const currentPath = computed(() => useRoute().path);
44
5+
const router = useRouter();
6+
57
interface TMenuItem {
68
title: string;
79
href: string;
@@ -101,6 +103,13 @@ function makeHeaderSticky() {
101103
observer.observe(target);
102104
}
103105
106+
function handleRightClick(event: MouseEvent) {
107+
// prevent default and navigate to /branding
108+
event.preventDefault();
109+
router.push('/branding');
110+
111+
}
112+
104113
onMounted(makeHeaderSticky);
105114
</script>
106115

@@ -109,7 +118,8 @@ onMounted(makeHeaderSticky);
109118
<div class="menu theme-light w-full">
110119
<div class="flex justify-between items-center">
111120
<div class="flex">
112-
<NuxtLink href="/" class="flex gap-2 text-verse-500 dark:text-verse-200" title="Hello Kitty!">
121+
<NuxtLink href="/" class="flex gap-2 text-verse-500 dark:text-verse-200" title="frontend.mu"
122+
@contextmenu="handleRightClick">
113123
<SiteLogo class="w-10" />
114124
<span class="hidden text-lg font-bold leading-none tracking-tighter md:text-3xl md:block">
115125
frontend.mu

0 commit comments

Comments
 (0)