forked from vuejs/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDeveloperHero.vue
65 lines (55 loc) · 1.33 KB
/
DeveloperHero.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
<script setup lang="ts">
import { computed } from 'vue'
import PageHero from '@theme/components/PageHero.vue'
import partnerConfig from '../partnerConfig.js'
import { useRoute } from 'vitepress'
import { generateUTMUrl } from './utils'
defineProps<{ title?: string }>()
const route = useRoute()
const hireUsLink = computed(() => generateUTMUrl(partnerConfig.hireUsButtonUrl, route.path))
</script>
<template>
<PageHero class="page-hero">
<template #title>{{ title || partnerConfig.pageHeroBanner.title }}</template>
<template #lead>
<p class="description">
{{ partnerConfig.pageHeroBanner.description1 }}
<br />
{{ partnerConfig.pageHeroBanner.description2 }}
<br />
</p>
<a
v-if="hireUsLink"
:href="hireUsLink"
target="_blank"
class="accent-button"
>
{{ partnerConfig.pageHeroBanner.hireButton.label }}
</a>
<p class="description">{{ partnerConfig.pageHeroBanner.footer }}</p>
</template>
</PageHero>
</template>
<style scoped>
.accent-button {
margin: 40px auto 16px;
}
br {
display: none;
}
/* Media Queries */
@media (min-width: 768px) {
.accent-button {
margin-top: 48px;
}
}
@media (min-width: 1024px) {
.page-hero {
max-width: 846px;
padding: 64px 0;
}
br {
display: block;
}
}
</style>