1
1
<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" />
10
4
<ParentLayout >
11
5
<template #page-top >
12
6
<CarbonAds
24
18
:placement =" $site.themeConfig.carbonAds.placement"
25
19
/>
26
20
</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
+
29
26
<a
30
- href =" https://github.com/sponsors/posva"
27
+ v-for =" sponsor in sponsors.platinum"
28
+ :href =" sponsor.href"
29
+ :key =" sponsor.href"
31
30
target =" _blank"
32
31
rel =" noopener"
33
- >Sponsors</a
34
32
>
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 >
35
41
36
42
<a
37
43
v-for =" sponsor in sponsors.gold"
@@ -62,17 +68,17 @@ export default {
62
68
BuySellAds,
63
69
BannerTop : () => import (' ./components/BannerTop.vue' )
64
70
},
65
- data () {
71
+ data () {
66
72
return {
67
73
sponsors,
68
74
showTopBanner: false
69
75
}
70
76
},
71
- mounted () {
77
+ mounted () {
72
78
this .showTopBanner = ! localStorage .getItem (' VS_BTS_BANNER_CLOSED' )
73
79
},
74
80
methods: {
75
- closeBannerTop () {
81
+ closeBannerTop () {
76
82
this .showTopBanner = false
77
83
localStorage .setItem (' VS_BTS_BANNER_CLOSED' , 1 )
78
84
}
@@ -97,23 +103,40 @@ export default {
97
103
margin-right : -24px ;
98
104
}
99
105
}
106
+
107
+ img {
108
+ max-width : 100% ;
109
+ }
100
110
</style >
101
111
102
112
<style scoped>
103
113
.sponsors {
104
- padding : 0 1.5rem 2rem ;
105
- font-size : 0.8rem ;
114
+ margin : 0 0 1rem 1.35rem ;
106
115
}
107
116
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 ;
109
126
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 ;
111
135
}
112
136
113
- .sponsors img {
114
- max-width : 200 px ;
115
- max-height : 40 px ;
137
+ .sponsors a {
138
+ margin-top : 10 px ;
139
+ width : 125 px ;
116
140
display : block ;
117
- margin : 1.25rem 0 ;
118
141
}
119
142
</style >
0 commit comments