Skip to content

Commit 36e4d9d

Browse files
committed
docs: add sponsors
1 parent 427d0ae commit 36e4d9d

File tree

4 files changed

+56
-29
lines changed

4 files changed

+56
-29
lines changed

docs/.vuepress/components/sponsors.json

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
{
2+
"platinum": [
3+
{
4+
"href": "https://www.finclip.com/#/home?from=vue",
5+
"alt": "Finogeeks",
6+
"imgSrcLight": "/sponsors/fincliplogo_black_svg.svg",
7+
"imgSrcDark": "/sponsors/fincliplogo_white_svg.svg"
8+
}
9+
],
210
"gold": [
311
{
412
"href": "https://passionatepeople.io/",
@@ -26,12 +34,6 @@
2634
"imgSrcLight": "https://www.vuemastery.com/images/vuemastery.svg",
2735
"imgSrcDark": "https://www.vuemastery.com/images/vuemastery.svg"
2836
},
29-
{
30-
"href": "https://www.codestream.com/?utm_source=github&utm_campaign=vuerouter&utm_medium=banner",
31-
"alt": "CodeStream",
32-
"imgSrcLight": "https://alt-images.codestream.com/codestream_logo_vuerouter.png",
33-
"imgSrcDark": "https://alt-images.codestream.com/codestream_logo_vuerouter.png"
34-
},
3537
{
3638
"href": "https://birdeatsbug.com/?utm_source=vuerouter&utm_medium=sponsor&utm_campaign=silver",
3739
"alt": "Bird Eats Bug",
Loading
Loading

docs/.vuepress/theme/Layout.vue

+46-23
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
<template>
2-
<div
3-
class="main-container"
4-
:class="{ 'has-top-banner': showTopBanner }"
5-
>
6-
<BannerTop
7-
v-if="showTopBanner"
8-
@close="closeBannerTop"
9-
/>
2+
<div class="main-container" :class="{ 'has-top-banner': showTopBanner }">
3+
<BannerTop v-if="showTopBanner" @close="closeBannerTop" />
104
<ParentLayout>
115
<template #page-top>
126
<CarbonAds
@@ -24,14 +18,26 @@
2418
:placement="$site.themeConfig.carbonAds.placement"
2519
/>
2620
</template>
27-
<template #sidebar-bottom>
28-
<div class="sponsors">
21+
22+
<template #sidebar-top>
23+
<div class="sponsors sponsors-top">
24+
<span>Platinum Sponsors</span>
25+
2926
<a
30-
href="https://github.com/sponsors/posva"
27+
v-for="sponsor in sponsors.platinum"
28+
:href="sponsor.href"
29+
:key="sponsor.href"
3130
target="_blank"
3231
rel="noopener"
33-
>Sponsors</a
3432
>
33+
<img :src="sponsor.imgSrcLight" :alt="sponsor.alt" />
34+
</a>
35+
</div>
36+
</template>
37+
38+
<template #sidebar-bottom>
39+
<div class="sponsors">
40+
<span>Sponsors</span>
3541

3642
<a
3743
v-for="sponsor in sponsors.gold"
@@ -62,17 +68,17 @@ export default {
6268
BuySellAds,
6369
BannerTop: () => import('./components/BannerTop.vue')
6470
},
65-
data () {
71+
data() {
6672
return {
6773
sponsors,
6874
showTopBanner: false
6975
}
7076
},
71-
mounted () {
77+
mounted() {
7278
this.showTopBanner = !localStorage.getItem('VS_BTS_BANNER_CLOSED')
7379
},
7480
methods: {
75-
closeBannerTop () {
81+
closeBannerTop() {
7682
this.showTopBanner = false
7783
localStorage.setItem('VS_BTS_BANNER_CLOSED', 1)
7884
}
@@ -97,23 +103,40 @@ export default {
97103
margin-right: -24px;
98104
}
99105
}
106+
107+
img {
108+
max-width: 100%;
109+
}
100110
</style>
101111

102112
<style scoped>
103113
.sponsors {
104-
padding: 0 1.5rem 2rem;
105-
font-size: 0.8rem;
114+
margin: 0 0 1rem 1.35rem;
106115
}
107116
108-
.sponsors a {
117+
.sponsors-top {
118+
margin-top: 1rem;
119+
/* workaround padding in vitepress */
120+
margin-bottom: -2rem;
121+
}
122+
123+
.sponsors > span {
124+
/* margin: 1.25rem 0; */
125+
display: block;
109126
color: #999;
110-
display: inline;
127+
font-size: 0.8rem;
128+
}
129+
130+
.sponsors a:last-child {
131+
margin-bottom: 20px;
132+
}
133+
.sponsors a:first-child {
134+
margin-top: 18px;
111135
}
112136
113-
.sponsors img {
114-
max-width: 200px;
115-
max-height: 40px;
137+
.sponsors a {
138+
margin-top: 10px;
139+
width: 125px;
116140
display: block;
117-
margin: 1.25rem 0;
118141
}
119142
</style>

0 commit comments

Comments
 (0)