File tree Expand file tree Collapse file tree 3 files changed +59
-31
lines changed Expand file tree Collapse file tree 3 files changed +59
-31
lines changed Original file line number Diff line number Diff line change @@ -48,24 +48,5 @@ onMounted(() => {
48
48
.cta {
49
49
margin-top : 1rem ;
50
50
}
51
-
52
- .become-sponsor {
53
- font-size : 0.9em ;
54
- font-weight : 700 ;
55
- width : auto ;
56
- background-color : transparent ;
57
- padding : 0.75em 2em ;
58
- border-radius : 2em ;
59
- transition : all 0.15s ease ;
60
- box-sizing : border-box ;
61
- border : 2px solid var (--c-text );
62
- color : var (--c-text );
63
- }
64
-
65
- .become-sponsor :hover {
66
- background-color : var (--c-yellow );
67
- text-decoration : none ;
68
- border-color : var (--c-yellow );
69
- color : var (--c-text-light-1 );
70
- }
71
51
</style >
52
+
Original file line number Diff line number Diff line change @@ -25,17 +25,36 @@ export const Layout: FunctionalComponent = () => {
25
25
'sidebar-top' : ( ) =>
26
26
h ( 'div' , { class : 'sponsors sponsors-top' } , [
27
27
h ( 'span' , 'Platinum Sponsors' ) ,
28
- ...sponsors . platinum . map ( ( { href, imgSrcDark, imgSrcLight, alt } ) =>
29
- h (
30
- 'a' ,
31
- {
32
- href,
33
- target : '_blank' ,
34
- rel : 'noopener' ,
35
- } ,
36
- [ h ( 'img' , { src : isDark . value ? imgSrcDark : imgSrcLight , alt } ) ]
37
- )
38
- ) ,
28
+ ...( sponsors . platinum . length
29
+ ? sponsors . platinum . map ( ( { href, imgSrcDark, imgSrcLight, alt } ) =>
30
+ h (
31
+ 'a' ,
32
+ {
33
+ href,
34
+ target : '_blank' ,
35
+ rel : 'noopener' ,
36
+ } ,
37
+ [
38
+ h ( 'img' , {
39
+ src : isDark . value ? imgSrcDark : imgSrcLight ,
40
+ alt,
41
+ } ) ,
42
+ ]
43
+ )
44
+ )
45
+ : [
46
+ h (
47
+ 'a' ,
48
+ {
49
+ class : 'become-sponsor' ,
50
+ href : 'https://github.com/sponsors/posva' ,
51
+ target : '_blank' ,
52
+ rel : 'noopener' ,
53
+ alt : 'Your logo here' ,
54
+ } ,
55
+ 'Become a Sponsor!'
56
+ ) ,
57
+ ] ) ,
39
58
] ) ,
40
59
'sidebar-bottom' : ( ) =>
41
60
h ( 'div' , { class : 'sponsors' } , [
Original file line number Diff line number Diff line change @@ -183,3 +183,31 @@ code {
183
183
font-size : 0.95em ;
184
184
padding : 0.175em 0.35em ;
185
185
}
186
+
187
+ .become-sponsor {
188
+ font-size : 0.9em ;
189
+ font-weight : 700 ;
190
+ width : auto;
191
+ text-align : center;
192
+ background-color : transparent;
193
+ padding : 0.75em 2em ;
194
+ border-radius : 2em ;
195
+ transition : all 0.15s ease;
196
+ box-sizing : border-box;
197
+ border : 2px solid var (--c-text );
198
+ color : var (--c-text );
199
+ }
200
+
201
+ .become-sponsor : hover {
202
+ background-color : var (--c-yellow );
203
+ text-decoration : none;
204
+ border-color : var (--c-yellow );
205
+ color : var (--c-text-light-1 );
206
+ }
207
+
208
+ .sponsors-top .become-sponsor {
209
+ font-size : 0.75em ;
210
+ padding : 0.2em ;
211
+ width : auto;
212
+ max-width : 150px ;
213
+ }
You can’t perform that action at this time.
0 commit comments