Skip to content

Commit b08c02e

Browse files
committed
up
1 parent b41892b commit b08c02e

File tree

2 files changed

+44
-40
lines changed

2 files changed

+44
-40
lines changed

app/components/AppHeader.vue

Lines changed: 3 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<script setup lang="ts">
22
import type { ContentNavigationItem } from '@nuxt/content'
3+
import TemplateMenu from "~/components/TemplateMenu.vue";
34
45
const navigation = inject<Ref<ContentNavigationItem[]>>('navigation')
56
@@ -22,46 +23,8 @@ const { header } = useAppConfig()
2223
</template>
2324
</UContentSearchButton>
2425

25-
<template #title>
26-
<div class="flex items-center gap-2">
27-
<LogoPro class="w-auto h-6 shrink-0" />
28-
<UDropdownMenu
29-
v-slot="{ open }"
30-
:modal="false"
31-
:items="[{
32-
label: `Starter`,
33-
to: 'https://starter-template.nuxt.dev/'
34-
}, {
35-
label: `Landing`,
36-
to: 'https://landing-template.nuxt.dev/'
37-
}, {
38-
label: `Docs`,
39-
to: 'https://docs-template.nuxt.dev/',
40-
checked: true,
41-
type: 'checkbox'
42-
}, {
43-
label: `SaaS`,
44-
to: 'https://saas-template.nuxt.dev/'
45-
}, {
46-
label: `Dashboard`,
47-
to: 'https://dashboard-template.nuxt.dev/'
48-
}]"
49-
:ui="{ content: 'w-(--reka-dropdown-menu-trigger-width) min-w-0' }"
50-
size="xs"
51-
>
52-
<UButton
53-
label="Docs"
54-
variant="subtle"
55-
trailing-icon="i-lucide-chevron-down"
56-
size="xs"
57-
class="-mb-[6px] font-semibold rounded-full truncate"
58-
:class="[open && 'bg-[var(--ui-primary)]/15 ']"
59-
:ui="{
60-
trailingIcon: ['transition-transform duration-200', open ? 'rotate-180' : undefined].filter(Boolean).join(' ')
61-
}"
62-
/>
63-
</UDropdownMenu>
64-
</div>
26+
<template #left>
27+
<TemplateMenu />
6528
</template>
6629

6730
<template #right>

app/components/TemplateMenu.vue

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<template>
2+
<div class="flex items-center gap-2">
3+
<LogoPro class="w-auto h-6 shrink-0" />
4+
<UDropdownMenu
5+
v-slot="{ open }"
6+
:modal="false"
7+
:items="[{
8+
label: `Starter`,
9+
to: 'https://starter-template.nuxt.dev/'
10+
}, {
11+
label: `Landing`,
12+
to: 'https://landing-template.nuxt.dev/'
13+
}, {
14+
label: `Docs`,
15+
to: 'https://docs-template.nuxt.dev/',
16+
checked: true,
17+
type: 'checkbox'
18+
}, {
19+
label: `SaaS`,
20+
to: 'https://saas-template.nuxt.dev/'
21+
}, {
22+
label: `Dashboard`,
23+
to: 'https://dashboard-template.nuxt.dev/'
24+
}]"
25+
:ui="{ content: 'w-(--reka-dropdown-menu-trigger-width) min-w-0' }"
26+
size="xs"
27+
>
28+
<UButton
29+
label="Docs"
30+
variant="subtle"
31+
trailing-icon="i-lucide-chevron-down"
32+
size="xs"
33+
class="-mb-[6px] font-semibold rounded-full truncate"
34+
:class="[open && 'bg-[var(--ui-primary)]/15 ']"
35+
:ui="{
36+
trailingIcon: ['transition-transform duration-200', open ? 'rotate-180' : undefined].filter(Boolean).join(' ')
37+
}"
38+
/>
39+
</UDropdownMenu>
40+
</div>
41+
</template>

0 commit comments

Comments
 (0)