Skip to content

Commit e1c63d8

Browse files
committed
fix: home page css style
1 parent 72e4a4c commit e1c63d8

File tree

2 files changed

+38
-32
lines changed

2 files changed

+38
-32
lines changed

.vitepress/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,12 @@ const nav: ThemeConfig['nav'] = [
126126
link: '/sponsor/'
127127
},
128128
{
129-
text: 'Experts',
129+
text: '专家',
130130
badge: { text: '新' },
131131
activeMatch: `^/(partners|developers)/`,
132132
items: [
133133
{ text: '合作伙伴', link: '/partners/' },
134-
{ text: 'Developers', link: '/developers/', badge: { text: '新' } }
134+
{ text: '开发者', link: '/developers/', badge: { text: '新' } }
135135
]
136136
}
137137
]

.vitepress/theme/components/Home.vue

Lines changed: 36 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -54,57 +54,37 @@ onMounted(load)
5454
</p>
5555
</section>
5656

57-
<section id="special-sponsor">
58-
<template v-if="data && data.platinum_china">
57+
<section v-if="data && data.platinum_china" id="special-sponsor">
58+
<template >
5959
<h3>中国区铂金赞助</h3>
6060
<div id="special-sponsor-container">
61-
<template
62-
v-for="{
63-
url,
64-
img,
65-
name,
66-
height,
67-
description
68-
} of data.platinum_china"
61+
<template v-for="{ url, img, name, height, description } of data.platinum_china"
6962
>
70-
<a
71-
class="logo"
72-
:href="url"
73-
target="_blank"
74-
rel="sponsored noopener"
75-
>
63+
<a class="logo" :href="url" target="_blank" rel="sponsored noopener">
7664
<picture v-if="img.endsWith('png')">
7765
<source
7866
type="image/avif"
79-
:srcset="`${base}/images/${img.replace(
80-
/\.png$/,
81-
'.avif'
82-
)}`"
83-
/>
84-
<img
85-
:src="`${base}/images/${img}`"
86-
:alt="name"
87-
:style="{ height: height || '50px' }"
67+
:srcset="`${base}/images/${img.replace(/\.png$/,'.avif')}`"
8868
/>
69+
<img :src="`${base}/images/${img}`" :alt="name" :style="{ height: height || '50px' }" />
8970
</picture>
9071
<img
91-
width="150"
72+
width="168"
73+
height="42"
9274
v-else
9375
:src="`${base}/images/${img}`"
9476
:alt="name"
9577
/>
9678
</a>
79+
<span>{{ description }}</span>
9780
</template>
9881
</div>
9982
</template>
100-
<a v-else-if="data" class="lead" href="/sponsor/"
101-
>中国区铂金赞助位 点击了解更多</a
102-
>
10383
</section>
10484
<section v-else id="special-sponsor">
10585
<span>
10686
<a href="/sponsor/#tier-benefits">
107-
Special Sponsor slot is now vacant - Inquire now
87+
中国区铂金赞助位现已空缺-立即咨询
10888
</a>
10989
</span>
11090
</section>
@@ -283,6 +263,8 @@ html:not(.dark) .accent,
283263
border-top: 1px solid var(--vt-c-divider-light);
284264
border-bottom: 1px solid var(--vt-c-divider-light);
285265
padding: 12px 24px;
266+
display: flex;
267+
align-items: center;
286268
}
287269
288270
#special-sponsor h3 {
@@ -304,6 +286,30 @@ html:not(.dark) .accent,
304286
padding: 0 20px;
305287
}
306288
289+
#special-sponsor span {
290+
color: var(--vt-c-text-2);
291+
font-weight: 500;
292+
font-size: 13px;
293+
vertical-align: middle;
294+
flex: 1;
295+
}
296+
297+
#special-sponsor span:first-child {
298+
text-align: right;
299+
}
300+
301+
302+
#special-sponsor a {
303+
display: flex;
304+
justify-content: center;
305+
padding: 0 24px;
306+
}
307+
308+
#special-sponsor img {
309+
height: 42px;
310+
margin: -6px 0;
311+
}
312+
307313
.dark #special-sponsor img {
308314
filter: grayscale(1) invert(1);
309315
}

0 commit comments

Comments
 (0)