File tree 2 files changed +59
-3
lines changed
2 files changed +59
-3
lines changed Original file line number Diff line number Diff line change @@ -9,8 +9,59 @@ const { data } = useSponsor()
9
9
<VPHomeSponsors
10
10
v-if =" data"
11
11
message =" Vite is free and open source, made possible by wonderful sponsors."
12
- action-text =" Become a sponsor"
13
- action-link =" https://github.com/sponsors/yyx990803"
14
12
:data =" data"
15
13
/>
14
+ <div class =" action" >
15
+ <a
16
+ class =" sponsor"
17
+ href =" https://github.com/sponsors/vitejs"
18
+ target =" _blank"
19
+ rel =" noreferrer"
20
+ >
21
+ Sponsor Vite
22
+ </a >
23
+ <a
24
+ class =" sponsor"
25
+ href =" https://github.com/sponsors/yyx990803"
26
+ target =" _blank"
27
+ rel =" noreferrer"
28
+ >
29
+ Sponsor Evan You
30
+ </a >
31
+ </div >
16
32
</template >
33
+
34
+ <style scoped>
35
+ .action {
36
+ display : flex ;
37
+ justify-content : center ;
38
+ gap : 1rem ;
39
+ padding-top : 4rem ;
40
+ }
41
+
42
+ .sponsor {
43
+ /* .VPButton */
44
+ display : inline-block ;
45
+ border : 1px solid transparent ;
46
+ text-align : center ;
47
+ font-weight : 600 ;
48
+ white-space : nowrap ;
49
+ transition : color 0.25s , border-color 0.25s , background-color 0.25s ;
50
+ /* .VPButton.medium */
51
+ border-radius : 20px ;
52
+ padding : 0 20px ;
53
+ line-height : 38px ;
54
+ font-size : 14px ;
55
+ /* .VPButton.sponsor */
56
+ border-color : var (--vp-button-sponsor-border );
57
+ color : var (--vp-button-sponsor-text );
58
+ background-color : var (--vp-button-sponsor-bg );
59
+ }
60
+
61
+ .sponsor :hover {
62
+ /* .VPButton.sponsor:hover */
63
+ border-color : var (--vp-button-sponsor-hover-border );
64
+ color : var (--vp-button-sponsor-hover-text );
65
+ background-color : var (--vp-button-sponsor-hover-bg );
66
+ }
67
+ </style >
Original file line number Diff line number Diff line change @@ -21,6 +21,11 @@ const data = ref()
21
21
const dataHost = 'https://sponsors.vuejs.org'
22
22
const dataUrl = `${ dataHost } /vite.json`
23
23
24
+ // no sponsors yet :(
25
+ const viteSponsors : Pick < Sponsors , 'gold' > = {
26
+ gold : [ ] ,
27
+ }
28
+
24
29
export function useSponsor ( ) {
25
30
onMounted ( async ( ) => {
26
31
if ( data . value ) {
@@ -48,7 +53,7 @@ function mapSponsors(sponsors: Sponsors) {
48
53
{
49
54
tier : 'Gold Sponsors' ,
50
55
size : 'medium' ,
51
- items : mapImgPath ( sponsors [ 'gold' ] ) ,
56
+ items : viteSponsors [ 'gold' ] . concat ( mapImgPath ( sponsors [ 'gold' ] ) ) ,
52
57
} ,
53
58
]
54
59
}
You can’t perform that action at this time.
0 commit comments