Skip to content

Commit c078788

Browse files
committed
fix special sponsor styling
1 parent fc5d8aa commit c078788

File tree

1 file changed

+23
-25
lines changed

1 file changed

+23
-25
lines changed

.vitepress/theme/components/Home.vue

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -55,31 +55,29 @@ onMounted(load)
5555
</section>
5656

5757
<section v-if="data && data.platinum_china" id="special-sponsor">
58-
<template >
59-
<h3>中国区铂金赞助</h3>
60-
<div id="special-sponsor-container">
61-
<template v-for="{ url, img, name, height, description } of data.platinum_china"
62-
>
63-
<a class="logo" :href="url" target="_blank" rel="sponsored noopener">
64-
<picture v-if="img.endsWith('png')">
65-
<source
66-
type="image/avif"
67-
:srcset="`${base}/images/${img.replace(/\.png$/,'.avif')}`"
68-
/>
69-
<img :src="`${base}/images/${img}`" :alt="name" :style="{ height: height || '50px' }" />
70-
</picture>
71-
<img
72-
width="168"
73-
height="42"
74-
v-else
75-
:src="`${base}/images/${img}`"
76-
:alt="name"
58+
<h3>中国区铂金赞助</h3>
59+
<div id="special-sponsor-container">
60+
<template v-for="{ url, img, name, height, description } of data.platinum_china"
61+
>
62+
<a class="logo" :href="url" target="_blank" rel="sponsored noopener">
63+
<picture v-if="img.endsWith('png')">
64+
<source
65+
type="image/avif"
66+
:srcset="`${base}/images/${img.replace(/\.png$/,'.avif')}`"
7767
/>
78-
</a>
79-
<span>{{ description }}</span>
80-
</template>
81-
</div>
82-
</template>
68+
<img :src="`${base}/images/${img}`" :alt="name" :style="{ height: height || '50px' }" />
69+
</picture>
70+
<img
71+
width="168"
72+
height="42"
73+
v-else
74+
:src="`${base}/images/${img}`"
75+
:alt="name"
76+
/>
77+
</a>
78+
<span>{{ description }}</span>
79+
</template>
80+
</div>
8381
</section>
8482
<section v-else id="special-sponsor">
8583
<span>
@@ -264,14 +262,14 @@ html:not(.dark) .accent,
264262
border-bottom: 1px solid var(--vt-c-divider-light);
265263
padding: 12px 24px;
266264
display: flex;
265+
justify-content: center;
267266
align-items: center;
268267
}
269268
270269
#special-sponsor h3 {
271270
text-align: center;
272271
font-size: 13px;
273272
font-weight: 500;
274-
padding-bottom: 10px;
275273
}
276274
277275
#special-sponsor-container {

0 commit comments

Comments
 (0)