Skip to content

Commit d6b8bcd

Browse files
committedJan 4, 2022
docs: sponsors buttons
1 parent fb6a9ca commit d6b8bcd

File tree

2 files changed

+30
-11
lines changed

2 files changed

+30
-11
lines changed
 

‎docs/.vuepress/components/HomeSponsors.vue

+13-4
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
<a
99
class="become-sponsor button white"
1010
href="https://github.com/sponsors/posva"
11-
>Become a Sponsor!</a
12-
>
11+
>Become a Sponsor!</a>
1312
</div>
1413
</div>
1514
</template>
@@ -62,11 +61,13 @@ export default {
6261
opacity: 1;
6362
}
6463
65-
#sponsors .become-sponsor {
64+
#sponsors .become-sponsor,
65+
.become-sponsor {
6666
margin-top: 40px;
6767
font-size: 0.9em;
6868
font-weight: 700;
6969
width: auto;
70+
text-align: center;
7071
background-color: transparent;
7172
padding: 0.75em 2em;
7273
border-radius: 2em;
@@ -75,8 +76,16 @@ export default {
7576
border: 1px solid #4fc08d;
7677
}
7778
78-
#sponsors .become-sponsor:hover {
79+
#sponsors .become-sponsor:hover,
80+
.become-sponsor:hover {
7981
background-color: #4fc08d;
8082
color: white;
8183
}
84+
85+
.sponsors-top .become-sponsor.become-sponsor {
86+
font-size: 0.75em;
87+
padding: 0.2em;
88+
width: auto;
89+
max-width: 150px;
90+
}
8291
</style>

‎docs/.vuepress/theme/Layout.vue

+17-7
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,25 @@
2222
<div class="sponsors sponsors-top">
2323
<span>Platinum Sponsors</span>
2424

25+
<template v-if="sponsors.platinum.length">
26+
<a
27+
v-for="sponsor in sponsors.platinum"
28+
:href="sponsor.href"
29+
:key="sponsor.href"
30+
target="_blank"
31+
rel="noopener"
32+
>
33+
<img :src="sponsor.imgSrcLight" :alt="sponsor.alt" />
34+
</a>
35+
</template>
2536
<a
26-
v-for="sponsor in sponsors.platinum"
27-
:href="sponsor.href"
28-
:key="sponsor.href"
37+
v-else
38+
class="become-sponsor"
39+
href="https://github.com/sponsors/posva"
2940
target="_blank"
3041
rel="noopener"
31-
>
32-
<img :src="sponsor.imgSrcLight" :alt="sponsor.alt" />
33-
</a>
42+
alt="Your logo here"
43+
>Become a Sponsor!</a>
3444
</div>
3545
</template>
3646

@@ -77,7 +87,7 @@ export default {
7787
<style>
7888
@media screen and (max-width: 1300px) {
7989
.content__default::before {
80-
content: '';
90+
content: "";
8191
/* background-color: red; */
8292
position: relative;
8393
display: block;

0 commit comments

Comments
 (0)
Please sign in to comment.