Skip to content

Commit 3f0179e

Browse files
authored
feat: add sponsor button to team members settings (#1351)
1 parent 5693838 commit 3f0179e

File tree

5 files changed

+43
-7
lines changed

5 files changed

+43
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
},
77
"dependencies": {
88
"@vue/repl": "^0.4.3",
9-
"@vue/theme": "^0.1.15",
9+
"@vue/theme": "^0.1.16",
1010
"vue": "^3.2.23"
1111
},
1212
"devDependencies": {

pnpm-lock.yaml

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/about/team/Member.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export interface Member {
99
languages: string[]
1010
website?: Link
1111
socials: Socials
12+
sponsor?: string
1213
}
1314

1415
export interface Link {

src/about/team/TeamMember.vue

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
VTIconCodePen,
66
VTIconGitHub,
77
VTIconGlobe,
8+
VTIconHeart,
89
VTIconLink,
910
VTIconLinkedIn,
1011
VTIconMapPin,
@@ -24,6 +25,10 @@ const avatarUrl = computed(() => {
2425

2526
<template>
2627
<article class="TeamMember">
28+
<VTLink v-if="member.sponsor" class="sponsor" :href="member.sponsor" no-icon>
29+
<VTIconHeart class="sponsor-icon" /> Sponsor
30+
</VTLink>
31+
2732
<figure class="avatar">
2833
<img class="avatar-img" :src="avatarUrl" :alt="`${member.name}'s Profile Picture`">
2934
</figure>
@@ -142,6 +147,7 @@ const avatarUrl = computed(() => {
142147

143148
<style scoped>
144149
.TeamMember {
150+
position: relative;
145151
background-color: var(--vt-c-bg-soft);
146152
transition: background-color 0.5s;
147153
}
@@ -158,6 +164,33 @@ const avatarUrl = computed(() => {
158164
}
159165
}
160166
167+
.sponsor {
168+
position: absolute;
169+
top: 16px;
170+
right: 16px;
171+
display: flex;
172+
align-items: center;
173+
border: 1px solid #fd1d7c;
174+
border-radius: 4px;
175+
padding: 4px 8px;
176+
font-size: 12px;
177+
font-weight: 500;
178+
color: #fd1d7c;
179+
transition: color 0.25s, background-color 0.25s;
180+
}
181+
182+
.sponsor:hover {
183+
color: var(--vt-c-white);
184+
background-color: #fd1d7c;
185+
}
186+
187+
.sponsor-icon {
188+
margin-right: 6px;
189+
width: 14px;
190+
height: 14px;
191+
fill: currentColor;
192+
}
193+
161194
.avatar {
162195
flex-shrink: 0;
163196
padding: 32px 32px 0;

src/about/team/members-core.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
"socials": {
2323
"github": "yyx990803",
2424
"twitter": "youyuxi"
25-
}
25+
},
26+
"sponsor": "https://github.com/sponsors/yyx990803"
2627
},
2728
{
2829
"name": "Ben Hong",
@@ -478,7 +479,8 @@
478479
"socials": {
479480
"github": "kiaking",
480481
"twitter": "KiaKing85"
481-
}
482+
},
483+
"sponsor": "https://github.com/sponsors/kiaking"
482484
},
483485
{
484486
"name": "Anthony Fu",

0 commit comments

Comments
 (0)