Skip to content

Commit 7d926de

Browse files
committed
Merge branch 'upstream' into sync
2 parents 91aa936 + f9c82f4 commit 7d926de

File tree

106 files changed

+6920
-2130
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+6920
-2130
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,5 @@ src/tutorial/data.json
112112
draft.md
113113

114114
# IDEs
115+
# folders created by IDE
115116
.idea

.vitepress/config.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ const nav: ThemeConfig['nav'] = [
4545
text: '资源',
4646
items: [
4747
{ text: '合作伙伴', link: '/partners/' },
48+
{ text: '开发者', link: '/developers/' },
4849
{ text: '主题', link: '/ecosystem/themes' },
4950
{ text: 'UI 组件', link: 'https://ui-libs.vercel.app/' },
5051
{
@@ -125,9 +126,13 @@ const nav: ThemeConfig['nav'] = [
125126
link: '/sponsor/'
126127
},
127128
{
128-
text: '合作伙伴',
129-
link: '/partners/',
130-
activeMatch: `^/partners/`
129+
text: 'Experts',
130+
badge: { text: '新' },
131+
activeMatch: `^/(partners|developers)/`,
132+
items: [
133+
{ text: '合作伙伴', link: '/partners/' },
134+
{ text: 'Developers', link: '/developers/', badge: { text: '新' } }
135+
]
131136
}
132137
]
133138

.vitepress/inlined-scripts/restorePreference.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
restore('vue-docs-prefer-composition', 'prefer-composition', true)
99
restore('vue-docs-prefer-sfc', 'prefer-sfc', true)
1010

11-
window.__VUE_BANNER_ID__ = 'vt2024_1'
12-
restore(`vue-docs-banner-${__VUE_BANNER_ID__}`, 'banner-dismissed')
11+
// window.__VUE_BANNER_ID__ = ''
12+
// restore(`vue-docs-banner-${__VUE_BANNER_ID__}`, 'banner-dismissed')
1313
})()

.vitepress/theme/components/Banner.vue

Lines changed: 13 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -22,31 +22,16 @@ function dismiss() {
2222

2323
<template>
2424
<div class="banner" v-if="open">
25-
<p class="vt-banner-text">
26-
<span class="vt-text-primary">VueConf Toronto</span>
27-
<span class="vt-tagline"> - Join the premier Vue.js conference</span>
28-
| 18-20 Nov 2024 <span class="vt-place"> - Toronto, Canada</span>
29-
<a
30-
target="_blank"
31-
class="vt-primary-action"
32-
href="https://vuetoronto.com/?utm_source=vuejs&utm_content=top_banner"
33-
>
34-
Register
35-
</a>
36-
</p>
25+
<a target="_blank"></a>
3726
<button @click="dismiss">
3827
<VTIconPlus class="close" />
3928
</button>
40-
<p class="vt-banner-text vt-coupon">
41-
<span class="vt-text-primary">Use code</span> VUEJS
42-
<span class="vt-text-primary">to get 15% off</span>
43-
</p>
4429
</div>
4530
</template>
4631

4732
<style>
4833
html:not(.banner-dismissed) {
49-
--vt-banner-height: 60px;
34+
--vt-banner-height: 30px;
5035
}
5136
</style>
5237

@@ -65,10 +50,12 @@ html:not(.banner-dismissed) {
6550
font-weight: 600;
6651
color: #fff;
6752
background-color: var(--vt-c-green);
68-
background: #11252b;
69-
display: flex;
70-
justify-content: center;
71-
align-items: center;
53+
background: linear-gradient(
54+
90deg,
55+
rgba(66, 184, 131, 1) 0%,
56+
rgba(39, 179, 137, 1) 19%,
57+
rgba(100, 126, 255, 1) 100%
58+
);
7259
}
7360
7461
.banner-dismissed .banner {
@@ -83,7 +70,7 @@ button {
8370
position: absolute;
8471
right: 0;
8572
top: 0;
86-
padding: 20px 10px;
73+
padding: 5px;
8774
}
8875
8976
.close {
@@ -92,59 +79,10 @@ button {
9279
fill: #fff;
9380
transform: rotate(45deg);
9481
}
95-
96-
.vt-banner-text {
97-
color: #fff;
98-
font-size: 16px;
99-
}
100-
101-
.vt-text-primary {
102-
color: #75c05e;
103-
}
104-
105-
.vt-primary-action {
106-
background: #75c05e;
107-
color: #121c1a;
108-
padding: 8px 15px;
109-
border-radius: 5px;
110-
font-size: 14px;
111-
text-decoration: none;
112-
margin: 0 20px;
113-
font-weight: bold;
114-
}
115-
.vt-primary-action:hover {
116-
text-decoration: none;
117-
background: #5a9f45;
118-
}
119-
120-
@media (max-width: 1280px) {
121-
.banner .vt-banner-text {
122-
font-size: 14px;
123-
}
124-
.vt-tagline {
125-
display: none;
126-
}
127-
}
128-
129-
@media (max-width: 780px) {
130-
.vt-tagline {
131-
display: none;
132-
}
133-
.vt-coupon {
134-
display: none;
135-
}
136-
.vt-primary-action {
137-
margin: 0 10px;
138-
padding: 7px 10px;
139-
}
140-
.vt-time-now {
141-
display: none;
142-
}
143-
}
144-
145-
@media (max-width: 560px) {
146-
.vt-place {
82+
/*
83+
@media (max-width: 720px) {
84+
a > span {
14785
display: none;
14886
}
149-
}
87+
} */
15088
</style>
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
<script setup lang="ts">
2+
withDefaults(defineProps<{
3+
title?: string
4+
description?: string
5+
link?: string
6+
linkText?: string
7+
showDivider?: boolean
8+
}>(), {
9+
showDivider: true
10+
})
11+
</script>
12+
13+
<template>
14+
<section class="cta-section">
15+
<div v-if="showDivider" class="cta-divider"></div>
16+
<div class="cta-content">
17+
<h2 v-if="title" class="cta-title">{{ title }}</h2>
18+
<p v-if="description" class="cta-description">{{ description }}</p>
19+
<a v-if="link" :href="link" target="_blank" class="cta-link">{{ linkText }}</a>
20+
<slot></slot>
21+
</div>
22+
</section>
23+
</template>
24+
25+
<style scoped>
26+
.cta-section {
27+
text-align: center;
28+
max-width: 688px;
29+
margin: 0 auto;
30+
}
31+
32+
.cta-divider {
33+
width: 100px;
34+
margin: 0 auto;
35+
border-top: 1px solid var(--vt-c-divider-light);
36+
}
37+
38+
.cta-content {
39+
padding: 28px 28px 96px;
40+
}
41+
42+
.cta-title {
43+
font-size: 34px;
44+
font-weight: 600;
45+
letter-spacing: -0.5px;
46+
line-height: 1.2;
47+
margin: 0.5em 0 1em;
48+
}
49+
50+
.cta-description {
51+
color: var(--vt-c-text-2);
52+
}
53+
54+
.cta-link {
55+
margin-top: 2em;
56+
display: inline-block;
57+
padding: 12px 24px;
58+
background-color: var(--vt-c-bg-mute);
59+
color: var(--vt-c-text-code);
60+
font-weight: 600;
61+
border-radius: 6px;
62+
text-decoration: none;
63+
transition: background-color 0.5s, color 0.5s;
64+
}
65+
66+
.cta-link:hover {
67+
background-color: var(--vt-c-gray-light-4);
68+
}
69+
70+
.dark .cta-link:hover {
71+
background-color: var(--vt-c-gray-dark-3);
72+
}
73+
</style>
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
<script setup lang="ts">
2+
import { computed, onMounted, ref, shallowRef } from 'vue'
3+
4+
const props = withDefaults(
5+
defineProps<{
6+
items: Array<any>
7+
filter?: (item: any) => boolean
8+
cardComponent: any
9+
showLinkToAll?: boolean
10+
shuffleItems?: boolean
11+
browseLinkText?: string
12+
browseLinkUrl?: string
13+
splitBy?: string
14+
}>(),
15+
{
16+
showLinkToAll: false,
17+
shuffleItems: false,
18+
splitBy: 'platinum'
19+
}
20+
)
21+
22+
const isMounted = ref(false)
23+
const items = shallowRef([...props.items])
24+
25+
const filteredItems = computed(() =>
26+
props.filter ? items.value.filter(props.filter) : items.value
27+
)
28+
29+
onMounted(() => {
30+
isMounted.value = true
31+
items.value = processItems([...items.value], props.splitBy, props.shuffleItems)
32+
})
33+
34+
function processItems(items: Array<any>, splitBy: string, shouldShuffle: boolean) {
35+
const splitItems = items.filter(item => item[splitBy])
36+
const otherItems = items.filter(item => !item[splitBy])
37+
38+
if (shouldShuffle) {
39+
shuffleArray(splitItems)
40+
shuffleArray(otherItems)
41+
}
42+
43+
return [...splitItems, ...otherItems]
44+
}
45+
46+
function shuffleArray(array: Array<any>) {
47+
for (let i = array.length - 1; i > 0; i--) {
48+
const j = Math.floor(Math.random() * (i + 1)); // don't remove semicolon
49+
[array[i], array[j]] = [array[j], array[i]]
50+
}
51+
}
52+
</script>
53+
54+
<template>
55+
<div v-show="isMounted" class="card-list">
56+
<!-- to skip SSG since the partners are shuffled -->
57+
<ClientOnly>
58+
<component
59+
:is="cardComponent"
60+
v-for="item in filteredItems"
61+
:key="item.id || item.name"
62+
:data="item"
63+
/>
64+
</ClientOnly>
65+
66+
<a
67+
v-if="showLinkToAll && filteredItems.length % 2"
68+
:href="browseLinkUrl"
69+
class="browse-all-link"
70+
>
71+
{{ browseLinkText }}
72+
</a>
73+
</div>
74+
</template>
75+
76+
<style scoped>
77+
.card-list {
78+
display: flex;
79+
flex-wrap: wrap;
80+
justify-content: space-between;
81+
}
82+
83+
.browse-all-link {
84+
display: block;
85+
width: 48.5%;
86+
margin-bottom: 36px;
87+
padding-top: 240px;
88+
font-size: 1.2em;
89+
text-align: center;
90+
color: var(--vt-c-text-2);
91+
border: 1px solid var(--vt-c-divider-light);
92+
border-radius: 4px;
93+
transition: color 0.5s ease;
94+
}
95+
96+
.browse-all-link:hover {
97+
color: var(--vt-c-text-1);
98+
}
99+
100+
@media (max-width: 768px) {
101+
.browse-all-link {
102+
display: none;
103+
}
104+
}
105+
</style>

.vitepress/theme/components/Home.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,13 @@ onMounted(load)
101101
>中国区铂金赞助位 点击了解更多</a
102102
>
103103
</section>
104+
<section v-else id="special-sponsor">
105+
<span>
106+
<a href="/sponsor/#tier-benefits">
107+
Special Sponsor slot is now vacant - Inquire now
108+
</a>
109+
</span>
110+
</section>
104111

105112
<section id="highlights" class="vt-box-container">
106113
<div class="vt-box">

0 commit comments

Comments
 (0)