Skip to content

Commit 82d679b

Browse files
committed
Add Contributors to Team Page
1 parent 34b796c commit 82d679b

File tree

3 files changed

+43
-43
lines changed

3 files changed

+43
-43
lines changed
Lines changed: 39 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,62 @@
11
<script setup>
22
import contributors from '../../contributors.json'
33
// console.debug('%c Contributors', 'color: Cyan', 'contributors:', contributors)
4-
const imageStyle = {}
4+
55
const props = defineProps({
6-
size: { type: String, default: null },
6+
size: { type: String, default: '64' },
7+
margin: { type: String, default: null },
8+
heading: { type: String, default: null },
79
})
8-
if (props.size) {
9-
imageStyle.height = props.size
10-
imageStyle.width = props.size
11-
}
10+
11+
const outerStyle = { margin: props.margin }
12+
console.log('outerStyle:', outerStyle)
13+
const imageStyle = { width: `${props.size}px`, height: `${props.size}px` }
14+
console.log('imageStyle:', imageStyle)
1215
</script>
1316

1417
<template>
15-
<div class="contributors">
16-
<a
17-
v-for="{ login, avatar_url } of contributors"
18-
:key="login"
19-
:aria-label="`${login} on GitHub`"
20-
:href="`https://github.com/${login}`"
21-
target="_blank"
22-
rel="noopener noreferrer"
23-
>
24-
<img :alt="login" :src="avatar_url" :style="imageStyle" loading="lazy" />
25-
</a>
18+
<div class="vp-contributors" :style="outerStyle">
19+
<div class="vp-contributors-heading" v-if="props.heading">{{ props.heading }}</div>
20+
<div class="vp-contributors-images">
21+
<a
22+
v-for="{ login, avatar_url } of contributors"
23+
:key="login"
24+
:aria-label="`${login} on GitHub`"
25+
:href="`https://github.com/${login}`"
26+
target="_blank"
27+
rel="noopener noreferrer"
28+
>
29+
<img
30+
:alt="login"
31+
:src="avatar_url"
32+
:width="props.size"
33+
:height="props.size"
34+
:style="imageStyle"
35+
loading="lazy"
36+
/>
37+
</a>
38+
</div>
2639
</div>
2740
</template>
2841

2942
<style scoped>
30-
div.contributors {
43+
div.vp-contributors-heading {
44+
font-size: 32px;
45+
text-align: center;
46+
margin-bottom: 36px;
47+
}
48+
49+
div.vp-contributors-images {
3150
display: flex;
3251
flex-wrap: wrap;
3352
gap: 0.8rem;
3453
justify-content: center;
3554
align-items: center;
3655
}
3756
38-
.contributors img {
57+
.vp-contributors img {
3958
margin: 0;
4059
border-radius: 50%;
41-
width: 4rem;
42-
height: 4rem;
4360
/* styles for img:hover transform */
4461
display: inline-block;
4562
vertical-align: middle;
@@ -51,7 +68,7 @@ div.contributors {
5168
transition-property: transform;
5269
}
5370
54-
.contributors img:hover {
71+
.vp-contributors img:hover {
5572
transform: scale(1.08);
5673
}
5774
</style>

docs/index.md

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -44,23 +44,4 @@ features:
4444
link: /team
4545
---
4646

47-
<div class="footer">
48-
49-
---
50-
51-
Contributors
52-
53-
<Contributors />
54-
55-
</div>
56-
57-
<style>
58-
div.footer {
59-
margin-top: 96px;
60-
text-align: center;
61-
}
62-
.footer p:first-of-type {
63-
text-align: center;
64-
font-size: 1.5em;
65-
}
66-
</style>
47+
<Contributors heading="Contributors" margin="96px 0" />

docs/team.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ const members = [
7676
<!--suppress CssUnusedSymbol -->
7777
<style>
7878
.VPTeamPage {
79-
margin-top: 0 !important;
79+
margin: 0 0 96px !important;
8080
}
8181
</style>
8282

@@ -91,3 +91,5 @@ const members = [
9191
</VPTeamPageTitle>
9292
<VPTeamMembers :members />
9393
</VPTeamPage>
94+
95+
<Contributors heading="Our Contributors" margin="0 0 96px" />

0 commit comments

Comments
 (0)