-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathAppNavigation.vue
More file actions
71 lines (68 loc) · 1.57 KB
/
Copy pathAppNavigation.vue
File metadata and controls
71 lines (68 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<script setup lang="ts">
import type { NavigationMenuItem } from '@nuxt/ui';
import { useAppIcons } from '@/composables/useAppIcons';
// Composable controlling Theme Config slideover open state
const { open: openThemeConfig } = useThemeConfig();
const { availableComponents } = useComponentPreviewConfig();
const localePath = useLocalePath();
const { t } = useI18n();
const { icon: appIcon } = useAppIcons();
defineProps<{
orientation: 'horizontal' | 'vertical';
}>();
const items = computed<NavigationMenuItem[][]>(() => [
[
{
label: t('nav.home'),
icon: appIcon('navHome'),
to: localePath('/'),
},
{
label: t('nav.cssVariables'),
icon: appIcon('navCss'),
to:'#',
onSelect: () => openThemeConfig(),
},
{
label: t('nav.customColors'),
icon: appIcon('navColors'),
to: localePath('/colors'),
},
{
label: t('nav.preview'),
icon: appIcon('navPreview'),
to: localePath('/preview'),
},
{
label: t('nav.components'),
icon: appIcon('navComponents'),
children: availableComponents.map(component => ({
label: component.label,
to: localePath(`/components/${component.value}`),
})),
},
{
label: t('nav.follow'),
type: 'label',
},
{
label: 'GitHub',
icon: appIcon('navGithub'),
target: '_blank',
to: 'https://github.com/Rareer/nuxt-ui-theme-builder',
},
{
label: 'LinkedIn',
icon: appIcon('navLinkedIn'),
target: '_blank',
to: 'https://www.linkedin.com/in/toni-kritz-5528a5184/',
},
],
]);
</script>
<template>
<UNavigationMenu
:items="items"
:orientation="orientation"
/>
</template>