Skip to content

Commit cdf0d5d

Browse files
committed
docs: sponsors update
1 parent e0416b1 commit cdf0d5d

File tree

3 files changed

+65
-42
lines changed

3 files changed

+65
-42
lines changed

docs/.vuepress/components/HomeSponsors.vue

+6-37
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,9 @@
11
<template>
22
<div id="sponsors">
33
<div class="inner">
4-
<template v-if="sponsors.platinum">
5-
<h3>Platinum Sponsors</h3>
6-
7-
<a
8-
v-for="sponsor in sponsors.platinum"
9-
:key="sponsor.href"
10-
:href="sponsor.href"
11-
target="_blank"
12-
rel="sponsored noopener"
13-
style="width: 160px;"
14-
>
15-
<img :src="sponsor.imgSrc" style="width: 160px;" :alt="sponsor.alt" />
16-
</a>
17-
<br />
18-
<br />
19-
</template>
20-
21-
<template v-if="sponsors.silver">
22-
<h3>Silver Sponsors</h3>
23-
24-
<a
25-
v-for="sponsor in sponsors.silver"
26-
:href="sponsor.href"
27-
target="_blank"
28-
rel="sponsored noopener"
29-
style="width: 120px;"
30-
>
31-
<img :src="sponsor.imgSrc" style="width: 120px;" :alt="sponsor.alt" />
32-
</a>
33-
34-
<br />
35-
<br />
36-
</template>
4+
<HomeSponsorsGroup name="Platinum" size="160" />
5+
<HomeSponsorsGroup name="Gold" size="140" />
6+
<HomeSponsorsGroup name="Silver" size="120" />
377

388
<a
399
class="become-sponsor button white"
@@ -45,14 +15,12 @@
4515
</template>
4616

4717
<script>
48-
import sponsors from './sponsors.json'
18+
import HomeSponsorsGroup from './HomeSponsorsGroup.vue'
4919
5020
export default {
5121
name: 'HomeSponsors',
5222
53-
created() {
54-
this.sponsors = sponsors
55-
}
23+
components: { HomeSponsorsGroup }
5624
}
5725
</script>
5826

@@ -74,6 +42,7 @@ export default {
7442
width: 100px;
7543
display: inline-block;
7644
vertical-align: middle;
45+
margin: 0 2px;
7746
}
7847
7948
#sponsors img {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<template>
2+
<div v-if="list && list.length">
3+
<h3>{{ name }} Sponsors</h3>
4+
5+
<a
6+
v-for="sponsor in list"
7+
:key="sponsor.href"
8+
:href="sponsor.href"
9+
target="_blank"
10+
rel="sponsored noopener"
11+
:style="{ width: size + 'px' }"
12+
>
13+
<img :src="sponsor.imgSrcLight" :style="{ width: size + 'px' }" />
14+
</a>
15+
<br />
16+
<br />
17+
</div>
18+
</template>
19+
20+
<script>
21+
import sponsors from './sponsors.json'
22+
23+
export default {
24+
name: 'HomeSponsorsGroup',
25+
26+
props: {
27+
name: {
28+
type: String,
29+
required: true
30+
},
31+
size: {
32+
type: [Number, String],
33+
default: 140
34+
}
35+
},
36+
37+
computed: {
38+
list() {
39+
return sponsors[this.name.toLowerCase()]
40+
}
41+
}
42+
}
43+
</script>

docs/.vuepress/components/sponsors.json

+16-5
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,41 @@
33
{
44
"href": "https://passionatepeople.io/",
55
"alt": "Passionate People",
6-
"imgSrc": "https://img2.storyblok.com/0x200/filters::format(webp)/f/86387/x/4cf6a70a8c/logo-white-text.svg"
6+
"imgSrcLight": "https://img2.storyblok.com/672x0/filters::format(webp)/f/86387/x/21aa32ed18/logo-normal.svg",
7+
"imgSrcDark": "https://img2.storyblok.com/0x200/filters::format(webp)/f/86387/x/4cf6a70a8c/logo-white-text.svg"
78
}
89
],
910
"silver": [
1011
{
1112
"href": "https://www.vuemastery.com/",
1213
"alt": "VueMastery",
13-
"imgSrc": "https://www.vuemastery.com/images/vuemastery.svg"
14+
"imgSrcLight": "https://www.vuemastery.com/images/vuemastery.svg",
15+
"imgSrcDark": "https://www.vuemastery.com/images/vuemastery.svg"
1416
},
1517
{
1618
"href": "https://www.vuetifyjs.com/",
17-
"imgSrc": "https://cdn.vuetifyjs.com/docs/images/logos/vuetify-logo-light-text.svg",
19+
"imgSrcLight": "https://cdn.vuetifyjs.com/docs/images/logos/vuetify-logo-light-text.svg",
20+
"imgSrcDark": "https://cdn.vuetifyjs.com/docs/images/logos/vuetify-logo-light-text.svg",
1821
"alt": "Vuetify"
22+
},
23+
{
24+
"href": "https://www.codestream.com/?utm_source=github&utm_campaign=vuerouter&utm_medium=banner",
25+
"alt": "CodeStream",
26+
"imgSrcLight": "https://alt-images.codestream.com/codestream_logo_vuerouter.png",
27+
"imgSrcDark": "https://alt-images.codestream.com/codestream_logo_vuerouter.png"
1928
}
2029
],
2130
"bronze": [
2231
{
2332
"href": "https://storyblok.com",
24-
"imgSrc": "https://a.storyblok.com/f/51376/3856x824/fea44d52a9/colored-full.png",
33+
"imgSrcLight": "https://a.storyblok.com/f/51376/3856x824/fea44d52a9/colored-full.png",
34+
"imgSrcDark": "https://a.storyblok.com/f/51376/3856x824/fea44d52a9/colored-full.png",
2535
"alt": "Storyblok"
2636
},
2737
{
2838
"href": "https://nuxtjs.org",
29-
"imgSrc": "https://nuxtjs.org/logos/nuxtjs-typo-white.svg",
39+
"imgSrcLight": "https://nuxtjs.org/logos/nuxtjs-typo.svg",
40+
"imgSrcDark": "https://nuxtjs.org/logos/nuxtjs-typo-white.svg",
3041
"alt": "NuxtJS"
3142
}
3243
]

0 commit comments

Comments
 (0)