themekit-js 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +27 -0
- package/bin/themekit.js +2 -0
- package/client.d.ts +5 -0
- package/dist/client/app/components/ClientOnly.js +10 -0
- package/dist/client/app/components/Content.js +23 -0
- package/dist/client/app/composables/codeGroups.js +40 -0
- package/dist/client/app/composables/copyCode.js +73 -0
- package/dist/client/app/composables/head.js +81 -0
- package/dist/client/app/composables/preFetch.js +99 -0
- package/dist/client/app/data.js +59 -0
- package/dist/client/app/devtools.js +29 -0
- package/dist/client/app/index.js +140 -0
- package/dist/client/app/router.js +233 -0
- package/dist/client/app/ssr.js +10 -0
- package/dist/client/app/theme.js +1 -0
- package/dist/client/app/utils.js +119 -0
- package/dist/client/index.d.ts +1446 -0
- package/dist/client/index.js +9 -0
- package/dist/client/shared.js +139 -0
- package/dist/client/theme-default/Layout.vue +94 -0
- package/dist/client/theme-default/NotFound.vue +109 -0
- package/dist/client/theme-default/components/VPAlgoliaSearchBox.vue +99 -0
- package/dist/client/theme-default/components/VPBackdrop.vue +41 -0
- package/dist/client/theme-default/components/VPBadge.vue +86 -0
- package/dist/client/theme-default/components/VPButton.vue +123 -0
- package/dist/client/theme-default/components/VPCarbonAds.vue +109 -0
- package/dist/client/theme-default/components/VPContent.vue +98 -0
- package/dist/client/theme-default/components/VPDoc.vue +193 -0
- package/dist/client/theme-default/components/VPDocAside.vue +46 -0
- package/dist/client/theme-default/components/VPDocAsideCarbonAds.vue +18 -0
- package/dist/client/theme-default/components/VPDocAsideOutline.vue +87 -0
- package/dist/client/theme-default/components/VPDocAsideSponsors.vue +17 -0
- package/dist/client/theme-default/components/VPDocFooter.vue +145 -0
- package/dist/client/theme-default/components/VPDocFooterLastUpdated.vue +50 -0
- package/dist/client/theme-default/components/VPDocOutlineItem.vue +59 -0
- package/dist/client/theme-default/components/VPFeature.vue +123 -0
- package/dist/client/theme-default/components/VPFeatures.vue +121 -0
- package/dist/client/theme-default/components/VPFlyout.vue +136 -0
- package/dist/client/theme-default/components/VPFooter.vue +60 -0
- package/dist/client/theme-default/components/VPHero.vue +336 -0
- package/dist/client/theme-default/components/VPHome.vue +43 -0
- package/dist/client/theme-default/components/VPHomeContent.vue +52 -0
- package/dist/client/theme-default/components/VPHomeFeatures.vue +14 -0
- package/dist/client/theme-default/components/VPHomeHero.vue +24 -0
- package/dist/client/theme-default/components/VPHomeSponsors.vue +116 -0
- package/dist/client/theme-default/components/VPImage.vue +46 -0
- package/dist/client/theme-default/components/VPLink.vue +33 -0
- package/dist/client/theme-default/components/VPLocalNav.vue +171 -0
- package/dist/client/theme-default/components/VPLocalNavOutlineDropdown.vue +190 -0
- package/dist/client/theme-default/components/VPLocalSearchBox.vue +856 -0
- package/dist/client/theme-default/components/VPMenu.vue +72 -0
- package/dist/client/theme-default/components/VPMenuGroup.vue +47 -0
- package/dist/client/theme-default/components/VPMenuLink.vue +54 -0
- package/dist/client/theme-default/components/VPNav.vue +57 -0
- package/dist/client/theme-default/components/VPNavBar.vue +267 -0
- package/dist/client/theme-default/components/VPNavBarAppearance.vue +25 -0
- package/dist/client/theme-default/components/VPNavBarExtra.vue +94 -0
- package/dist/client/theme-default/components/VPNavBarHamburger.vue +79 -0
- package/dist/client/theme-default/components/VPNavBarMenu.vue +29 -0
- package/dist/client/theme-default/components/VPNavBarMenuGroup.vue +42 -0
- package/dist/client/theme-default/components/VPNavBarMenuLink.vue +53 -0
- package/dist/client/theme-default/components/VPNavBarSearch.vue +194 -0
- package/dist/client/theme-default/components/VPNavBarSearchButton.vue +208 -0
- package/dist/client/theme-default/components/VPNavBarSocialLinks.vue +27 -0
- package/dist/client/theme-default/components/VPNavBarTitle.vue +76 -0
- package/dist/client/theme-default/components/VPNavBarTranslations.vue +47 -0
- package/dist/client/theme-default/components/VPNavScreen.vue +99 -0
- package/dist/client/theme-default/components/VPNavScreenAppearance.vue +33 -0
- package/dist/client/theme-default/components/VPNavScreenMenu.vue +23 -0
- package/dist/client/theme-default/components/VPNavScreenMenuGroup.vue +111 -0
- package/dist/client/theme-default/components/VPNavScreenMenuGroupLink.vue +39 -0
- package/dist/client/theme-default/components/VPNavScreenMenuGroupSection.vue +34 -0
- package/dist/client/theme-default/components/VPNavScreenMenuLink.vue +39 -0
- package/dist/client/theme-default/components/VPNavScreenSocialLinks.vue +14 -0
- package/dist/client/theme-default/components/VPNavScreenTranslations.vue +73 -0
- package/dist/client/theme-default/components/VPPage.vue +7 -0
- package/dist/client/theme-default/components/VPSidebar.vue +137 -0
- package/dist/client/theme-default/components/VPSidebarItem.vue +250 -0
- package/dist/client/theme-default/components/VPSkipLink.vue +68 -0
- package/dist/client/theme-default/components/VPSocialLink.vue +50 -0
- package/dist/client/theme-default/components/VPSocialLinks.vue +27 -0
- package/dist/client/theme-default/components/VPSponsors.vue +48 -0
- package/dist/client/theme-default/components/VPSponsorsGrid.vue +48 -0
- package/dist/client/theme-default/components/VPSwitch.vue +63 -0
- package/dist/client/theme-default/components/VPSwitchAppearance.vue +52 -0
- package/dist/client/theme-default/components/VPTeamMembers.vue +66 -0
- package/dist/client/theme-default/components/VPTeamMembersItem.vue +225 -0
- package/dist/client/theme-default/components/VPTeamPage.vue +58 -0
- package/dist/client/theme-default/components/VPTeamPageSection.vue +77 -0
- package/dist/client/theme-default/components/VPTeamPageTitle.vue +63 -0
- package/dist/client/theme-default/components/icons/VPIconAlignJustify.vue +8 -0
- package/dist/client/theme-default/components/icons/VPIconAlignLeft.vue +8 -0
- package/dist/client/theme-default/components/icons/VPIconAlignRight.vue +8 -0
- package/dist/client/theme-default/components/icons/VPIconArrowLeft.vue +7 -0
- package/dist/client/theme-default/components/icons/VPIconArrowRight.vue +7 -0
- package/dist/client/theme-default/components/icons/VPIconChevronDown.vue +5 -0
- package/dist/client/theme-default/components/icons/VPIconChevronLeft.vue +5 -0
- package/dist/client/theme-default/components/icons/VPIconChevronRight.vue +5 -0
- package/dist/client/theme-default/components/icons/VPIconChevronUp.vue +5 -0
- package/dist/client/theme-default/components/icons/VPIconEdit.vue +6 -0
- package/dist/client/theme-default/components/icons/VPIconHeart.vue +5 -0
- package/dist/client/theme-default/components/icons/VPIconLanguages.vue +9 -0
- package/dist/client/theme-default/components/icons/VPIconMinus.vue +5 -0
- package/dist/client/theme-default/components/icons/VPIconMinusSquare.vue +6 -0
- package/dist/client/theme-default/components/icons/VPIconMoon.vue +5 -0
- package/dist/client/theme-default/components/icons/VPIconMoreHorizontal.vue +7 -0
- package/dist/client/theme-default/components/icons/VPIconPlus.vue +5 -0
- package/dist/client/theme-default/components/icons/VPIconPlusSquare.vue +6 -0
- package/dist/client/theme-default/components/icons/VPIconSun.vue +13 -0
- package/dist/client/theme-default/composables/aside.js +17 -0
- package/dist/client/theme-default/composables/data.js +2 -0
- package/dist/client/theme-default/composables/edit-link.js +16 -0
- package/dist/client/theme-default/composables/flyout.js +41 -0
- package/dist/client/theme-default/composables/langs.js +26 -0
- package/dist/client/theme-default/composables/local-nav.js +18 -0
- package/dist/client/theme-default/composables/nav.js +30 -0
- package/dist/client/theme-default/composables/outline.js +178 -0
- package/dist/client/theme-default/composables/prev-next.js +57 -0
- package/dist/client/theme-default/composables/sidebar.js +136 -0
- package/dist/client/theme-default/composables/sponsor-grid.js +94 -0
- package/dist/client/theme-default/fonts/inter-italic-cyrillic-ext.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-italic-cyrillic.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-italic-greek-ext.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-italic-greek.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-italic-latin-ext.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-italic-latin.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-italic-vietnamese.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-roman-cyrillic-ext.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-roman-cyrillic.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-roman-greek-ext.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-roman-greek.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-roman-latin-ext.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-roman-latin.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-roman-vietnamese.woff2 +0 -0
- package/dist/client/theme-default/index.js +3 -0
- package/dist/client/theme-default/styles/base.css +252 -0
- package/dist/client/theme-default/styles/components/custom-block.css +208 -0
- package/dist/client/theme-default/styles/components/vp-code-group.css +85 -0
- package/dist/client/theme-default/styles/components/vp-code.css +7 -0
- package/dist/client/theme-default/styles/components/vp-doc.css +570 -0
- package/dist/client/theme-default/styles/components/vp-sponsor.css +155 -0
- package/dist/client/theme-default/styles/fonts.css +157 -0
- package/dist/client/theme-default/styles/icons.css +123 -0
- package/dist/client/theme-default/styles/utils.css +9 -0
- package/dist/client/theme-default/styles/vars.css +563 -0
- package/dist/client/theme-default/support/lru.js +33 -0
- package/dist/client/theme-default/support/sidebar.js +89 -0
- package/dist/client/theme-default/support/translation.js +49 -0
- package/dist/client/theme-default/support/utils.js +33 -0
- package/dist/client/theme-default/without-fonts.js +32 -0
- package/dist/node/cli.js +444 -0
- package/dist/node/index.d.ts +4588 -0
- package/dist/node/index.js +198 -0
- package/dist/node/serve-BjvG349_.js +50301 -0
- package/lib/vue-demi.mjs +34 -0
- package/package.json +223 -0
- package/template/.vitepress/config.js +28 -0
- package/template/.vitepress/theme/Layout.vue +21 -0
- package/template/.vitepress/theme/index.js +29 -0
- package/template/.vitepress/theme/style.css +143 -0
- package/template/api-examples.md +49 -0
- package/template/index.md +28 -0
- package/template/markdown-examples.md +85 -0
- package/theme-without-fonts.d.ts +2 -0
- package/theme.d.ts +30 -0
- package/types/default-theme.d.ts +533 -0
- package/types/docsearch.d.ts +144 -0
- package/types/index.d.ts +3 -0
- package/types/local-search.d.ts +33 -0
- package/types/shared.d.ts +199 -0
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { type Ref, inject } from 'vue'
|
|
3
|
+
import type { DefaultTheme } from 'vitepress/theme'
|
|
4
|
+
import VPButton from './VPButton.vue'
|
|
5
|
+
import VPImage from './VPImage.vue'
|
|
6
|
+
|
|
7
|
+
export interface HeroAction {
|
|
8
|
+
theme?: 'brand' | 'alt'
|
|
9
|
+
text: string
|
|
10
|
+
link: string
|
|
11
|
+
target?: string
|
|
12
|
+
rel?: string
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
defineProps<{
|
|
16
|
+
name?: string
|
|
17
|
+
text?: string
|
|
18
|
+
tagline?: string
|
|
19
|
+
image?: DefaultTheme.ThemeableImage
|
|
20
|
+
actions?: HeroAction[]
|
|
21
|
+
}>()
|
|
22
|
+
|
|
23
|
+
const heroImageSlotExists = inject('hero-image-slot-exists') as Ref<boolean>
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<template>
|
|
27
|
+
<div class="VPHero" :class="{ 'has-image': image || heroImageSlotExists }">
|
|
28
|
+
<div class="container">
|
|
29
|
+
<div class="main">
|
|
30
|
+
<slot name="home-hero-info-before" />
|
|
31
|
+
<slot name="home-hero-info">
|
|
32
|
+
<h1 v-if="name" class="name">
|
|
33
|
+
<span v-html="name" class="clip"></span>
|
|
34
|
+
</h1>
|
|
35
|
+
<p v-if="text" v-html="text" class="text"></p>
|
|
36
|
+
<p v-if="tagline" v-html="tagline" class="tagline"></p>
|
|
37
|
+
</slot>
|
|
38
|
+
<slot name="home-hero-info-after" />
|
|
39
|
+
|
|
40
|
+
<div v-if="actions" class="actions">
|
|
41
|
+
<div v-for="action in actions" :key="action.link" class="action">
|
|
42
|
+
<VPButton
|
|
43
|
+
tag="a"
|
|
44
|
+
size="medium"
|
|
45
|
+
:theme="action.theme"
|
|
46
|
+
:text="action.text"
|
|
47
|
+
:href="action.link"
|
|
48
|
+
:target="action.target"
|
|
49
|
+
:rel="action.rel"
|
|
50
|
+
/>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
<slot name="home-hero-actions-after" />
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<div v-if="image || heroImageSlotExists" class="image">
|
|
57
|
+
<div class="image-container">
|
|
58
|
+
<div class="image-bg" />
|
|
59
|
+
<slot name="home-hero-image">
|
|
60
|
+
<VPImage v-if="image" class="image-src" :image="image" />
|
|
61
|
+
</slot>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
</template>
|
|
67
|
+
|
|
68
|
+
<style scoped>
|
|
69
|
+
.VPHero {
|
|
70
|
+
margin-top: calc((var(--vp-nav-height) + var(--vp-layout-top-height, 0px)) * -1);
|
|
71
|
+
padding: calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 48px) 24px 48px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@media (min-width: 640px) {
|
|
75
|
+
.VPHero {
|
|
76
|
+
padding: calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 80px) 48px 64px;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@media (min-width: 960px) {
|
|
81
|
+
.VPHero {
|
|
82
|
+
padding: calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 80px) 64px 64px;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.container {
|
|
87
|
+
display: flex;
|
|
88
|
+
flex-direction: column;
|
|
89
|
+
margin: 0 auto;
|
|
90
|
+
max-width: 1152px;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@media (min-width: 960px) {
|
|
94
|
+
.container {
|
|
95
|
+
flex-direction: row;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.main {
|
|
100
|
+
position: relative;
|
|
101
|
+
z-index: 10;
|
|
102
|
+
order: 2;
|
|
103
|
+
flex-grow: 1;
|
|
104
|
+
flex-shrink: 0;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.VPHero.has-image .container {
|
|
108
|
+
text-align: center;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
@media (min-width: 960px) {
|
|
112
|
+
.VPHero.has-image .container {
|
|
113
|
+
text-align: left;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
@media (min-width: 960px) {
|
|
118
|
+
.main {
|
|
119
|
+
order: 1;
|
|
120
|
+
width: calc((100% / 3) * 2);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.VPHero.has-image .main {
|
|
124
|
+
max-width: 592px;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.name,
|
|
129
|
+
.text {
|
|
130
|
+
max-width: 392px;
|
|
131
|
+
letter-spacing: -0.4px;
|
|
132
|
+
line-height: 40px;
|
|
133
|
+
font-size: 32px;
|
|
134
|
+
font-weight: 700;
|
|
135
|
+
white-space: pre-wrap;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.VPHero.has-image .name,
|
|
139
|
+
.VPHero.has-image .text {
|
|
140
|
+
margin: 0 auto;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.name {
|
|
144
|
+
color: var(--vp-home-hero-name-color);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.clip {
|
|
148
|
+
background: var(--vp-home-hero-name-background);
|
|
149
|
+
-webkit-background-clip: text;
|
|
150
|
+
background-clip: text;
|
|
151
|
+
-webkit-text-fill-color: var(--vp-home-hero-name-color);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
@media (min-width: 640px) {
|
|
155
|
+
.name,
|
|
156
|
+
.text {
|
|
157
|
+
max-width: 576px;
|
|
158
|
+
line-height: 56px;
|
|
159
|
+
font-size: 48px;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
@media (min-width: 960px) {
|
|
164
|
+
.name,
|
|
165
|
+
.text {
|
|
166
|
+
line-height: 64px;
|
|
167
|
+
font-size: 56px;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.VPHero.has-image .name,
|
|
171
|
+
.VPHero.has-image .text {
|
|
172
|
+
margin: 0;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.tagline {
|
|
177
|
+
padding-top: 8px;
|
|
178
|
+
max-width: 392px;
|
|
179
|
+
line-height: 28px;
|
|
180
|
+
font-size: 18px;
|
|
181
|
+
font-weight: 500;
|
|
182
|
+
white-space: pre-wrap;
|
|
183
|
+
color: var(--vp-c-text-2);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.VPHero.has-image .tagline {
|
|
187
|
+
margin: 0 auto;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
@media (min-width: 640px) {
|
|
191
|
+
.tagline {
|
|
192
|
+
padding-top: 12px;
|
|
193
|
+
max-width: 576px;
|
|
194
|
+
line-height: 32px;
|
|
195
|
+
font-size: 20px;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
@media (min-width: 960px) {
|
|
200
|
+
.tagline {
|
|
201
|
+
line-height: 36px;
|
|
202
|
+
font-size: 24px;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.VPHero.has-image .tagline {
|
|
206
|
+
margin: 0;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.actions {
|
|
211
|
+
display: flex;
|
|
212
|
+
flex-wrap: wrap;
|
|
213
|
+
margin: -6px;
|
|
214
|
+
padding-top: 24px;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.VPHero.has-image .actions {
|
|
218
|
+
justify-content: center;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
@media (min-width: 640px) {
|
|
222
|
+
.actions {
|
|
223
|
+
padding-top: 32px;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
@media (min-width: 960px) {
|
|
228
|
+
.VPHero.has-image .actions {
|
|
229
|
+
justify-content: flex-start;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.action {
|
|
234
|
+
flex-shrink: 0;
|
|
235
|
+
padding: 6px;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.image {
|
|
239
|
+
order: 1;
|
|
240
|
+
margin: -76px -24px -48px;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
@media (min-width: 640px) {
|
|
244
|
+
.image {
|
|
245
|
+
margin: -108px -24px -48px;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
@media (min-width: 960px) {
|
|
250
|
+
.image {
|
|
251
|
+
flex-grow: 1;
|
|
252
|
+
order: 2;
|
|
253
|
+
margin: 0;
|
|
254
|
+
min-height: 100%;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.image-container {
|
|
259
|
+
position: relative;
|
|
260
|
+
margin: 0 auto;
|
|
261
|
+
width: 320px;
|
|
262
|
+
height: 320px;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
@media (min-width: 640px) {
|
|
266
|
+
.image-container {
|
|
267
|
+
width: 392px;
|
|
268
|
+
height: 392px;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
@media (min-width: 960px) {
|
|
273
|
+
.image-container {
|
|
274
|
+
display: flex;
|
|
275
|
+
justify-content: center;
|
|
276
|
+
align-items: center;
|
|
277
|
+
width: 100%;
|
|
278
|
+
height: 100%;
|
|
279
|
+
/*rtl:ignore*/
|
|
280
|
+
transform: translate(-32px, -32px);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.image-bg {
|
|
285
|
+
position: absolute;
|
|
286
|
+
top: 50%;
|
|
287
|
+
/*rtl:ignore*/
|
|
288
|
+
left: 50%;
|
|
289
|
+
border-radius: 50%;
|
|
290
|
+
width: 192px;
|
|
291
|
+
height: 192px;
|
|
292
|
+
background-image: var(--vp-home-hero-image-background-image);
|
|
293
|
+
filter: var(--vp-home-hero-image-filter);
|
|
294
|
+
/*rtl:ignore*/
|
|
295
|
+
transform: translate(-50%, -50%);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
@media (min-width: 640px) {
|
|
299
|
+
.image-bg {
|
|
300
|
+
width: 256px;
|
|
301
|
+
height: 256px;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
@media (min-width: 960px) {
|
|
306
|
+
.image-bg {
|
|
307
|
+
width: 320px;
|
|
308
|
+
height: 320px;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
:deep(.image-src) {
|
|
313
|
+
position: absolute;
|
|
314
|
+
top: 50%;
|
|
315
|
+
/*rtl:ignore*/
|
|
316
|
+
left: 50%;
|
|
317
|
+
max-width: 192px;
|
|
318
|
+
max-height: 192px;
|
|
319
|
+
/*rtl:ignore*/
|
|
320
|
+
transform: translate(-50%, -50%);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
@media (min-width: 640px) {
|
|
324
|
+
:deep(.image-src) {
|
|
325
|
+
max-width: 256px;
|
|
326
|
+
max-height: 256px;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
@media (min-width: 960px) {
|
|
331
|
+
:deep(.image-src) {
|
|
332
|
+
max-width: 320px;
|
|
333
|
+
max-height: 320px;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
</style>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import VPHomeHero from './VPHomeHero.vue'
|
|
3
|
+
import VPHomeFeatures from './VPHomeFeatures.vue'
|
|
4
|
+
import VPHomeContent from './VPHomeContent.vue'
|
|
5
|
+
import { useData } from '../composables/data'
|
|
6
|
+
|
|
7
|
+
const { frontmatter } = useData()
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<div class="VPHome">
|
|
12
|
+
<slot name="home-hero-before" />
|
|
13
|
+
<VPHomeHero>
|
|
14
|
+
<template #home-hero-info-before><slot name="home-hero-info-before" /></template>
|
|
15
|
+
<template #home-hero-info><slot name="home-hero-info" /></template>
|
|
16
|
+
<template #home-hero-info-after><slot name="home-hero-info-after" /></template>
|
|
17
|
+
<template #home-hero-actions-after><slot name="home-hero-actions-after" /></template>
|
|
18
|
+
<template #home-hero-image><slot name="home-hero-image" /></template>
|
|
19
|
+
</VPHomeHero>
|
|
20
|
+
<slot name="home-hero-after" />
|
|
21
|
+
|
|
22
|
+
<slot name="home-features-before" />
|
|
23
|
+
<VPHomeFeatures />
|
|
24
|
+
<slot name="home-features-after" />
|
|
25
|
+
|
|
26
|
+
<VPHomeContent v-if="frontmatter.markdownStyles !== false">
|
|
27
|
+
<Content />
|
|
28
|
+
</VPHomeContent>
|
|
29
|
+
<Content v-else />
|
|
30
|
+
</div>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<style scoped>
|
|
34
|
+
.VPHome {
|
|
35
|
+
margin-bottom: 96px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@media (min-width: 768px) {
|
|
39
|
+
.VPHome {
|
|
40
|
+
margin-bottom: 128px;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
</style>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { useWindowSize } from '@vueuse/core'
|
|
3
|
+
|
|
4
|
+
const { width: vw } = useWindowSize({ includeScrollbar: false })
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<div
|
|
9
|
+
class="vp-doc container"
|
|
10
|
+
:style="vw ? { '--vp-offset': `calc(50% - ${vw / 2}px)` } : {}"
|
|
11
|
+
>
|
|
12
|
+
<slot />
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<style scoped>
|
|
17
|
+
.container {
|
|
18
|
+
margin: auto;
|
|
19
|
+
width: 100%;
|
|
20
|
+
max-width: 1280px;
|
|
21
|
+
padding: 0 24px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@media (min-width: 640px) {
|
|
25
|
+
.container {
|
|
26
|
+
padding: 0 48px;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@media (min-width: 960px) {
|
|
31
|
+
.container {
|
|
32
|
+
width: 100%;
|
|
33
|
+
padding: 0 64px;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.vp-doc :deep(.VPHomeSponsors),
|
|
38
|
+
.vp-doc :deep(.VPTeamPage) {
|
|
39
|
+
margin-left: var(--vp-offset, calc(50% - 50vw));
|
|
40
|
+
margin-right: var(--vp-offset, calc(50% - 50vw));
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.vp-doc :deep(.VPHomeSponsors h2) {
|
|
44
|
+
border-top: none;
|
|
45
|
+
letter-spacing: normal;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.vp-doc :deep(.VPHomeSponsors a),
|
|
49
|
+
.vp-doc :deep(.VPTeamPage a){
|
|
50
|
+
text-decoration: none;
|
|
51
|
+
}
|
|
52
|
+
</style>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { useData } from '../composables/data'
|
|
3
|
+
import VPFeatures from './VPFeatures.vue'
|
|
4
|
+
|
|
5
|
+
const { frontmatter: fm } = useData()
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<VPFeatures
|
|
10
|
+
v-if="fm.features"
|
|
11
|
+
class="VPHomeFeatures"
|
|
12
|
+
:features="fm.features"
|
|
13
|
+
/>
|
|
14
|
+
</template>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { useData } from '../composables/data'
|
|
3
|
+
import VPHero from './VPHero.vue'
|
|
4
|
+
|
|
5
|
+
const { frontmatter: fm } = useData()
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<VPHero
|
|
10
|
+
v-if="fm.hero"
|
|
11
|
+
class="VPHomeHero"
|
|
12
|
+
:name="fm.hero.name"
|
|
13
|
+
:text="fm.hero.text"
|
|
14
|
+
:tagline="fm.hero.tagline"
|
|
15
|
+
:image="fm.hero.image"
|
|
16
|
+
:actions="fm.hero.actions"
|
|
17
|
+
>
|
|
18
|
+
<template #home-hero-info-before><slot name="home-hero-info-before" /></template>
|
|
19
|
+
<template #home-hero-info><slot name="home-hero-info" /></template>
|
|
20
|
+
<template #home-hero-info-after><slot name="home-hero-info-after" /></template>
|
|
21
|
+
<template #home-hero-actions-after><slot name="home-hero-actions-after" /></template>
|
|
22
|
+
<template #home-hero-image><slot name="home-hero-image" /></template>
|
|
23
|
+
</VPHero>
|
|
24
|
+
</template>
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import VPButton from './VPButton.vue'
|
|
3
|
+
import VPSponsors from './VPSponsors.vue'
|
|
4
|
+
|
|
5
|
+
export interface Sponsors {
|
|
6
|
+
tier: string
|
|
7
|
+
size?: 'medium' | 'big'
|
|
8
|
+
items: Sponsor[]
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface Sponsor {
|
|
12
|
+
name: string
|
|
13
|
+
img: string
|
|
14
|
+
url: string
|
|
15
|
+
}
|
|
16
|
+
interface Props {
|
|
17
|
+
message?: string
|
|
18
|
+
actionText?: string
|
|
19
|
+
actionLink?: string
|
|
20
|
+
data: Sponsors[]
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
withDefaults(defineProps<Props>(), {
|
|
24
|
+
actionText: 'Become a sponsor'
|
|
25
|
+
})
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<section class="VPHomeSponsors">
|
|
30
|
+
<div class="container">
|
|
31
|
+
<div class="header">
|
|
32
|
+
<div class="love">
|
|
33
|
+
<span class="vpi-heart icon" />
|
|
34
|
+
</div>
|
|
35
|
+
<h2 v-if="message" class="message">{{ message }}</h2>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
<div class="sponsors">
|
|
39
|
+
<VPSponsors :data="data" />
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
<div v-if="actionLink" class="action">
|
|
43
|
+
<VPButton theme="sponsor" :text="actionText" :href="actionLink" />
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
</section>
|
|
47
|
+
</template>
|
|
48
|
+
|
|
49
|
+
<style scoped>
|
|
50
|
+
.VPHomeSponsors {
|
|
51
|
+
border-top: 1px solid var(--vp-c-gutter);
|
|
52
|
+
padding-top: 88px !important;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.VPHomeSponsors {
|
|
56
|
+
margin: 96px 0;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@media (min-width: 768px) {
|
|
60
|
+
.VPHomeSponsors {
|
|
61
|
+
margin: 128px 0;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.VPHomeSponsors {
|
|
66
|
+
padding: 0 24px;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@media (min-width: 768px) {
|
|
70
|
+
.VPHomeSponsors {
|
|
71
|
+
padding: 0 48px;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@media (min-width: 960px) {
|
|
76
|
+
.VPHomeSponsors {
|
|
77
|
+
padding: 0 64px;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.container {
|
|
82
|
+
margin: 0 auto;
|
|
83
|
+
max-width: 1152px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.love {
|
|
87
|
+
margin: 0 auto;
|
|
88
|
+
width: fit-content;
|
|
89
|
+
font-size: 28px;
|
|
90
|
+
color: var(--vp-c-text-3);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.icon {
|
|
94
|
+
display: inline-block;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.message {
|
|
98
|
+
margin: 0 auto;
|
|
99
|
+
padding-top: 10px;
|
|
100
|
+
max-width: 320px;
|
|
101
|
+
text-align: center;
|
|
102
|
+
line-height: 24px;
|
|
103
|
+
font-size: 16px;
|
|
104
|
+
font-weight: 500;
|
|
105
|
+
color: var(--vp-c-text-2);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.sponsors {
|
|
109
|
+
padding-top: 32px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.action {
|
|
113
|
+
padding-top: 40px;
|
|
114
|
+
text-align: center;
|
|
115
|
+
}
|
|
116
|
+
</style>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { DefaultTheme } from 'vitepress/theme'
|
|
3
|
+
import { withBase } from 'vitepress'
|
|
4
|
+
|
|
5
|
+
defineProps<{
|
|
6
|
+
image: DefaultTheme.ThemeableImage
|
|
7
|
+
alt?: string
|
|
8
|
+
}>()
|
|
9
|
+
|
|
10
|
+
defineOptions({ inheritAttrs: false })
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<template v-if="image">
|
|
15
|
+
<img
|
|
16
|
+
v-if="typeof image === 'string' || 'src' in image"
|
|
17
|
+
class="VPImage"
|
|
18
|
+
v-bind="typeof image === 'string' ? $attrs : { ...image, ...$attrs }"
|
|
19
|
+
:src="withBase(typeof image === 'string' ? image : image.src)"
|
|
20
|
+
:alt="alt ?? (typeof image === 'string' ? '' : image.alt || '')"
|
|
21
|
+
/>
|
|
22
|
+
<template v-else>
|
|
23
|
+
<VPImage
|
|
24
|
+
class="dark"
|
|
25
|
+
:image="image.dark"
|
|
26
|
+
:alt="image.alt"
|
|
27
|
+
v-bind="$attrs"
|
|
28
|
+
/>
|
|
29
|
+
<VPImage
|
|
30
|
+
class="light"
|
|
31
|
+
:image="image.light"
|
|
32
|
+
:alt="image.alt"
|
|
33
|
+
v-bind="$attrs"
|
|
34
|
+
/>
|
|
35
|
+
</template>
|
|
36
|
+
</template>
|
|
37
|
+
</template>
|
|
38
|
+
|
|
39
|
+
<style scoped>
|
|
40
|
+
html:not(.dark) .VPImage.dark {
|
|
41
|
+
display: none;
|
|
42
|
+
}
|
|
43
|
+
.dark .VPImage.light {
|
|
44
|
+
display: none;
|
|
45
|
+
}
|
|
46
|
+
</style>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
import { normalizeLink } from '../support/utils'
|
|
4
|
+
import { EXTERNAL_URL_RE } from '../../shared'
|
|
5
|
+
|
|
6
|
+
const props = defineProps<{
|
|
7
|
+
tag?: string
|
|
8
|
+
href?: string
|
|
9
|
+
noIcon?: boolean
|
|
10
|
+
target?: string
|
|
11
|
+
rel?: string
|
|
12
|
+
}>()
|
|
13
|
+
|
|
14
|
+
const tag = computed(() => props.tag ?? (props.href ? 'a' : 'span'))
|
|
15
|
+
const isExternal = computed(() => props.href && EXTERNAL_URL_RE.test(props.href))
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<component
|
|
20
|
+
:is="tag"
|
|
21
|
+
class="VPLink"
|
|
22
|
+
:class="{
|
|
23
|
+
link: href,
|
|
24
|
+
'vp-external-link-icon': isExternal,
|
|
25
|
+
'no-icon': noIcon
|
|
26
|
+
}"
|
|
27
|
+
:href="href ? normalizeLink(href) : undefined"
|
|
28
|
+
:target="target ?? (isExternal ? '_blank' : undefined)"
|
|
29
|
+
:rel="rel ?? (isExternal ? 'noreferrer' : undefined)"
|
|
30
|
+
>
|
|
31
|
+
<slot />
|
|
32
|
+
</component>
|
|
33
|
+
</template>
|