1
1
<template >
2
2
<div class =" sponsors" >
3
- <h4 >GitHub Silver Sponsors</h4 >
4
- <p class =" sponsor-section" >
3
+ <h4 >Sponsors</h4 >
4
+ <div class =" sponsor-section silver " >
5
5
<a
6
+ class =" sponsor-item"
6
7
:href =" sponsor.url"
7
8
target =" _blank"
8
9
rel =" noopener"
9
10
v-for =" sponsor in sponsors"
11
+ :key =" sponsor.id"
10
12
>
11
- <img :src =" sponsor.imgUrl" />
13
+ <img :src =" sponsor.imgUrl" :alt = " sponsor.name " />
12
14
</a >
13
- </p >
15
+ <a href =" /donate" class =" sponsor-item action" >Your logo</a >
16
+ </div >
14
17
</div >
15
18
</template >
16
19
@@ -19,13 +22,15 @@ import { ref } from 'vue'
19
22
20
23
const sponsors = ref ([
21
24
{
25
+ id: 1 ,
22
26
name: ' Worksome' ,
23
27
imgUrl: ' /assets/img/sponsors/worksome.svg' ,
24
28
url: ' https://www.worksome.com' ,
25
29
description:
26
30
' Hire and manage talent globally with automated contracts and payroll.'
27
31
},
28
32
{
33
+ id: 2 ,
29
34
name: ' BairesDev' ,
30
35
imgUrl: ' /assets/img/sponsors/bairesdev.png' ,
31
36
url: ' https://www.bairesdev.com/sponsoring-open-source-projects/' ,
@@ -40,23 +45,67 @@ const sponsors = ref([
40
45
}
41
46
42
47
.sponsors h4 {
43
- text-align : center ;
48
+ /* text-align: center; */
44
49
color : var (--c-text-lighter );
45
50
}
46
51
47
- .sponsors .sponsor-section {
48
- text-align : center ;
49
- margin-top : 0 ;
52
+ .sponsors .sponsor-section.silver {
53
+ /* text-align: center;
54
+ margin-top: 0; */
55
+ --max-width : 240px ;
56
+ display : grid ;
57
+ grid-template-columns : repeat (auto-fill , minmax (var (--max-width ), 1fr ));
58
+ column-gap : 4px ;
50
59
}
51
60
52
- .sponsors .sponsor-section a {
53
- margin : 10px 20px ;
61
+ @media (max-width : 720px ) {
62
+ .sponsors .sponsor-section.silver {
63
+ --max-width : 180px ;
64
+ }
65
+ }
66
+
67
+ @media (max-width : 480px ) {
68
+ .sponsors .sponsor-section.silver {
69
+ --max-width : 150px ;
70
+ }
54
71
}
55
72
56
- .sponsors .sponsor-section a ,
57
- .sponsors .sponsor-section img {
58
- max-width : 180px ;
59
- display : inline-block ;
60
- vertical-align : middle ;
73
+ .sponsors .sponsor-item {
74
+ /* margin: 10px 20px; */
75
+ background-color : #f9f9f9 ;
76
+ margin : 2px 0 ;
77
+ display : flex ;
78
+ justify-content : space-around ;
79
+ align-items : center ;
80
+ border-radius : 2px ;
81
+ transition : background-color 0.2s ease ;
82
+ height : calc (var (--max-width ) / 2 - 50px );
83
+ }
84
+
85
+ .dark .sponsors .sponsor-item {
86
+ background-color : #242424 ;
87
+ }
88
+ .dark .sponsors img {
89
+ filter : grayscale (1 ) invert (1 );
90
+ }
91
+
92
+ .dark .sponsors .sponsor-item :hover {
93
+ color : #213547 ;
94
+ background-color : #f1f1f1 ;
95
+ }
96
+ .dark .sponsors .sponsor-item :hover img {
97
+ filter : none ;
98
+ }
99
+
100
+ .sponsors img {
101
+ max-width : calc (var (--max-width ) - 30px );
102
+ max-height : calc (var (--max-width ) / 2 - 20px );
103
+ }
104
+ .sponsors .action {
105
+ font-size : 13px ;
106
+ color : var (--c-text-lighter );
107
+ }
108
+ .dark .sponsors .action {
109
+ color : white ;
61
110
}
62
111
</style >
0 commit comments