-
Notifications
You must be signed in to change notification settings - Fork 4.7k
/
Copy pathDeveloperLanding.vue
116 lines (102 loc) · 2.75 KB
/
DeveloperLanding.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
<script setup lang="ts">
import { ref, computed, onMounted } from 'vue'
import data from '../developers.json'
import { DeveloperProfiles, DeveloperProfile } from './type'
import { useRoute } from 'vitepress'
import { generateUTMUrl } from './utils'
import PageShowcaseListLayout from '@theme/components/PageShowcaseListLayout.vue'
import CardList from '@theme/components/CardList.vue'
import DeveloperHero from './DeveloperHero.vue'
import DeveloperCard from './DeveloperCard.vue'
import DeveloperJoin from './DeveloperJoin.vue'
import partnerConfig from '../partnerConfig'
const route = useRoute()
const hireUsLink = computed(() => generateUTMUrl(partnerConfig.hireUsButtonUrl, route.path))
const allDevelopers = ref<DeveloperProfiles>(data as DeveloperProfiles)
const spotlightedProfile = ref<DeveloperProfile | null>(null)
onMounted(() => {
spotlightedProfile.value = allDevelopers.value.length
? allDevelopers.value[Math.floor(Math.random() * allDevelopers.value.length)]
: null
})
</script>
<template>
<PageShowcaseListLayout
spotlightTitle="Spotlight"
featuredTitle="Vue.js Certified developers"
>
<template #hero>
<DeveloperHero />
</template>
<template #spotlight>
<DeveloperCard v-if="spotlightedProfile" hero :data="spotlightedProfile" />
</template>
<template #actions>
<a
v-if="hireUsLink"
:href="hireUsLink"
target="_blank"
class="accent-button"
>
Contact {{ partnerConfig.partnerName }} for a tailored fit
</a>
</template>
<template #featured-list>
<CardList
v-if="allDevelopers?.length"
:items="allDevelopers"
:cardComponent="DeveloperCard"
/>
</template>
<template #featured-cta>
<div class="featured-cta">
<a
v-if="hireUsLink"
:href="hireUsLink"
target="_blank"
class="accent-button"
>
Contact {{ partnerConfig.partnerName }} for a tailored fit
</a>
</div>
</template>
<template #join>
<DeveloperJoin />
</template>
</PageShowcaseListLayout>
</template>
<style scoped>
/* Action Selection Styles */
:deep(.featured-actions) {
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 40px;
}
/* Card title */
:deep(.section-title) {
margin-bottom: 32px;
}
/* Page CTA */
.featured-cta {
margin: 1.5rem auto;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
@media (min-width: 768px) {
/* Action Selection Styles */
:deep(.showcase-layout__featured) {
padding: 48px 48px;
position: relative;
}
:deep(.featured-actions) {
width: auto;
display: block;
position: absolute;
top: 34px;
right: 48px;
}
}
</style>