generated from antfu-collective/vitesse-lite
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathheader.vue
284 lines (270 loc) · 11.2 KB
/
header.vue
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
<!-- This example requires Tailwind CSS v2.0+ -->
<template>
<Popover class="relative bg-white">
<div class="max-w-7xl mx-auto px-4 sm:px-6">
<div class="flex justify-between items-center py-6 md:space-x-10">
<div class="flex justify-start lg:w-0 lg:flex-1">
<router-link to="/">
<img class="h-8 sm:h-10 min-w-min" src="/public/assets/images/header-logo.svg" alt="" />
</router-link>
</div>
<div class="-mr-2 -my-2 lg:hidden">
<PopoverButton class="bg-white rounded-md p-2 inline-flex items-center justify-center text-voxo-gray hover:text-voxo-gray-dark hover:bg-gray-10 focus:outline-none ml-auto">
<span class="sr-only">Open menu</span>
<MenuIcon class="h-6 w-6" aria-hidden="true" />
</PopoverButton>
</div>
<PopoverGroup as="nav" class="hidden lg:flex space-x-10">
<!-- <router-link
to="/"
class="text-base p-1 block font-semibold"
:class="$route.name === 'index' ? 'font-semibold text-voxo-gray-dark' : 'font-normal text-voxo-gray'"
>
Home
</router-link>-->
<router-link
to="/product"
class="text-base p-1 block"
:class="$route.name === 'product' ? 'font-einasemibold text-voxo-gray-dark' : 'font-eina'"
>
Product
</router-link>
<router-link
to="/team"
class="text-base p-1 block"
:class="$route.name === 'team' ? 'font-einasemibold text-voxo-gray-dark' : 'font-eina'"
>
Team
</router-link>
<Popover v-slot="{ open }" class="relative">
<PopoverButton ref="flyoutMenu" :class="[open ? '' : '', 'group bg-white rounded-md inline-flex items-center text-base focus:outline-none font-eina p-1']">
<span>Locations</span>
<ChevronDownIcon :class="[open ? '' : '', 'ml-2 h-4 w-4 font-eina']" aria-hidden="true" />
</PopoverButton>
<transition
enter-active-class="transition ease-out duration-200"
enter-from-class="opacity-0 translate-y-1"
enter-to-class="opacity-100 translate-y-0"
leave-active-class="transition ease-in duration-150"
leave-from-class="opacity-100 translate-y-0"
leave-to-class="opacity-0 translate-y-1"
>
<PopoverPanel ref="mobileMenu" class="absolute z-30 left-1/2 transform -translate-x-1/2 mt-3 px-2 w-screen max-w-md sm:px-0 lg:max-w-3xl">
<div class="rounded-lg shadow-lg ring-1 ring-black ring-opacity-5 overflow-hidden">
<div class="relative grid gap-6 bg-white px-5 py-6 sm:gap-8 sm:p-8 lg:grid-cols-2">
<router-link
v-for="item in locations"
:key="item.name"
:to="`/locations${item.href}`"
class="-m-3 p-3 flex items-start rounded-lg hover:bg-gray-50 transition ease-in-out duration-150"
@click="hideFlyoutMenu"
>
<div class="flex-shrink-0 flex items-center justify-center h-10 w-10 rounded-md text-white sm:h-12 sm:w-12">
<img :src="item.icon" :alt="item.name" />
</div>
<div class="ml-4">
<p class="text-base font-einasemibold">
{{ item.name }}
</p>
<p class="mt-1 text-sm text-gray-500">
{{ item.description }}
</p>
</div>
</router-link>
</div>
</div>
</PopoverPanel>
</transition>
</Popover>
<router-link
to="/contact"
class="text-base p-1 block"
:class="$route.name === 'contact' ? 'font-einasemibold text-voxo-gray-dark' : 'font-eina'"
>
Contact
</router-link>
<a
href="https://docs.voxo.co/voxo-public/release-notes/whats-new"
class="text-base p-1 block font-eina"
target="_blank"
>
What's New
</a>
</PopoverGroup>
<div class="hidden lg:flex items-center justify-end lg:flex-1 lg:w-0">
<span class="inline-flex">
<a href="https://calendly.com/nickkelsoe/demo-with-voxo" target="_blank" class="inline-flex items-center justify-center py-2 px-4 mr-6 border-1 border-transparent bg-voxo-red text-sm border-voxo-red hover:border-voxo-gray-dark text-base hover:text-voxo-gray-dark hover:bg-white shadow-sm rounded-md text-white font-einasemibold transition duration-200">
Book A Demo
</a>
</span>
<span class="inline-flex">
<a target="_blank" href="https://app.voxo.co" class="inline-flex items-center justify-center py-2 px-4 border-1 border-transparent bg-voxo-gray-dark text-sm border-voxo-gray-dark text-base hover:text-voxo-gray-dark hover:bg-white shadow-sm rounded-md text-white font-einasemibold transition duration-200">
Login
</a>
</span>
</div>
</div>
</div>
<transition
enter-active-class="duration-200 ease-out"
enter-from-class="opacity-0 scale-95"
enter-to-class="opacity-100 scale-100"
leave-active-class="duration-100 ease-in"
leave-from-class="opacity-100 scale-100"
leave-to-class="opacity-0 scale-95"
>
<PopoverPanel focus class="absolute top-0 left-1 inset-x-0 pl-2 pt-2 pr-5 transition transform origin-top-right lg:hidden z-30">
<div class="rounded-lg shadow-lg ring-1 ring-black ring-opacity-5 bg-white divide-y-2 divide-gray-50">
<div class="pt-5 pb-6 px-5">
<div class="flex items-center justify-between">
<div>
<img class="h-8 w-auto" src="/public/assets/images/header-logo.svg" alt="VOXO" />
</div>
<div class="-mr-2">
<PopoverButton ref="menuClose" class="bg-white rounded-md p-2 inline-flex items-center justify-center text-gray-400 hover:text-gray-500 hover:bg-gray-100">
<span class="sr-only">Close menu</span>
<XIcon class="h-6 w-6" aria-hidden="true" />
</PopoverButton>
</div>
</div>
<div class="mt-6">
<nav class="grid gap-y-2">
<router-link
to="/"
class="text-base p-1 block"
:class="$route.name === 'index' ? 'font-einasemibold text-voxo-gray-dark' : 'font-eina'"
@click="hideMenu"
>
Home
</router-link>
<router-link
to="/product"
class="text-base p-1 block"
:class="$route.name === 'product' ? 'font-einasemibold text-voxo-gray-dark' : 'font-eina'"
@click="hideMenu"
>
Product
</router-link>
<router-link
to="/team"
class="text-base p-1 block"
:class="$route.name === 'team' ? 'font-einasemibold text-voxo-gray-dark' : 'font-eina'"
@click="hideMenu"
>
Team
</router-link>
<router-link
to="/contact"
class="text-base p-1 block"
:class="$route.name === 'contact' ? 'font-einasemibold text-voxo-gray-dark' : 'font-eina'"
@click="hideMenu"
>
Contact
</router-link>
<a
href="https://docs.voxo.co/voxo-public/release-notes/whats-new"
class="text-base p-1 block font-eina"
target="_blank"
>
What's New
</a>
</nav>
</div>
</div>
<div class="py-6 px-5 space-y-6">
<div class="grid grid-cols-2 gap-y-3 gap-x-8">
<router-link v-for="item in locations" :key="item.name" :to="`/locations${item.href}`" class="text-base flex items-center" @click="hideMenu">
<div class="flex-shrink-0 flex items-center justify-center h-8 w-8 rounded-md text-white sm:h-12 sm:w-12">
<img :src="item.icon" :alt="item.name" />
</div>
<span class="px-2">{{ item.name }}</span>
</router-link>
</div>
<div class="flex items-center">
<span class="inline-flex w-full">
<a id="intercomPopup" href="mailto:[email protected]" class="w-full inline-flex items-center justify-center py-2 px-4 mr-4 border-1 border-transparent bg-voxo-red text-sm border-voxo-red hover:border-voxo-gray-dark text-base hover:text-voxo-gray-dark hover:bg-white shadow-sm rounded-md text-white font-einasemibold transition duration-200">
Demo
</a>
</span>
<span class="inline-flex w-full">
<a href="https://app.voxo.co" target="" class="w-full inline-flex items-center justify-center py-2 px-4 border-1 border-transparent bg-voxo-gray-dark text-sm border-voxo-gray-dark text-base hover:text-voxo-gray-dark hover:bg-white shadow-sm rounded-md text-white font-einasemibold transition duration-200">
Login
</a>
</span>
</div>
</div>
</div>
</PopoverPanel>
</transition>
</Popover>
</template>
<script>
import { Popover, PopoverButton, PopoverGroup, PopoverPanel } from '@headlessui/vue'
import {
MenuIcon,
XIcon,
} from '@heroicons/vue/outline'
import { ChevronDownIcon } from '@heroicons/vue/solid'
const locations = [
{
name: 'Hattiesburg, MS',
description: 'We are at 7127 US-98 Suite 40',
href: '/hattiesburg',
icon: '/assets/images/icons/flag-hattiesburg.svg',
},
{
name: 'Houston, TX',
description: 'We are at 9595 Six Pines Dr. Suite 8210',
href: '/texas',
icon: '/assets/images/icons/flag-tx.svg',
},
{
name: 'Mobile, AL',
description: 'We are at 30s Congress Street',
href: '/mobile',
icon: '/assets/images/icons/flag-mobile.svg',
},
{
name: 'Nashville, TN',
description: 'We are at 4100 Smith School Rd.',
href: '/nashville',
icon: '/assets/images/icons/flag-nashville.svg',
},
{
name: 'Lancaster, PA',
description: 'We are at 800 New Holland Avenue',
href: '/lancaster',
icon: '/assets/images/icons/flag-pa.svg',
},
{
name: 'Belfast, UK',
description: 'We are in Northern Ireland',
href: '/belfast',
icon: '/assets/images/icons/flag-wi.svg',
},
]
export default {
components: {
Popover,
PopoverButton,
PopoverGroup,
PopoverPanel,
ChevronDownIcon,
MenuIcon,
XIcon,
},
setup() {
return {
locations,
}
},
methods: {
hideMenu() {
this.$refs.menuClose.handleClick()
},
hideFlyoutMenu() {
this.$refs.flyoutMenu.handleClick()
},
},
}
</script>