-
Notifications
You must be signed in to change notification settings - Fork 254
Expand file tree
/
Copy pathindex.vue
More file actions
103 lines (91 loc) · 2.87 KB
/
index.vue
File metadata and controls
103 lines (91 loc) · 2.87 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
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
<script setup lang="ts">
import type { ContentNavigationLink } from '@nuxt/ui/runtime/types/content.js'
definePageMeta({
heroBackground: 'opacity-80 -z-10'
})
const { filteredAgencies, fetchList, services, regions } = useEnterpriseAgencies()
const { data: page } = await useAsyncData('agencies-landing', () => queryCollection('landing').path('/enterprise/agencies').first())
if (!page.value) {
throw createError({ statusCode: 404, statusMessage: 'Page not found', fatal: true })
}
const title = page.value.title
const description = page.value.description
useSeoMeta({
titleTemplate: '%s · Enterprise',
title,
description,
ogDescription: description,
ogTitle: `${title} · Enterprise`
})
useCanonical()
defineOgImage('Docs.takumi', {
headline: 'Enterprise',
title,
description
})
const navigation = computed(() => {
return [
{ title: 'Technical Expertise', children: services.value, path: '/enterprise/agencies' },
{ title: 'Locations', children: regions.value, path: '/enterprise/agencies' }
] as unknown as ContentNavigationLink[]
})
await fetchList()
</script>
<template>
<UContainer v-if="page">
<UPageHero
:title="title"
:description="description"
:links="page.links"
/>
<UPage id="smooth" class="pt-20 -mt-20">
<template #left>
<UPageAside>
<UContentNavigation highlight :navigation="navigation" :collapsible="false" />
</UPageAside>
</template>
<UPageBody>
<UPageGrid v-if="filteredAgencies?.length" class="lg:grid-cols-2">
<UPageCard
v-for="(agency, index) in filteredAgencies"
:key="index"
variant="subtle"
:to="agency.path"
:title="agency.title"
:description="agency.description"
>
<template #leading>
<UColorModeAvatar
:light="agency.logo.light"
:dark="agency.logo.dark"
:alt="agency.location.title"
size="lg"
class="rounded-none bg-transparent"
/>
</template>
<template #footer>
<UBadge :label="agency.location.title" color="neutral" variant="subtle" />
</template>
</UPageCard>
</UPageGrid>
<EmptyCard v-else label="No agency matches your criteria for now.">
<UButton
label="Clear filters"
color="neutral"
variant="subtle"
trailing-icon="i-lucide-circle-x"
size="md"
@click="$router.replace({ query: {} })"
/>
<UButton
to="https://opencollective.com/nuxtjs/contribute/agency-partner-93555"
target="_blank"
color="neutral"
size="md"
label="Become a partner"
/>
</EmptyCard>
</UPageBody>
</UPage>
</UContainer>
</template>