Skip to content

[next] feat: add sponsor button to team members settings #1351

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"dependencies": {
"@vue/repl": "^0.4.3",
"@vue/theme": "^0.1.15",
"@vue/theme": "^0.1.16",
"vue": "^3.2.23"
},
"devDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/about/team/Member.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export interface Member {
languages: string[]
website?: Link
socials: Socials
sponsor?: string
}

export interface Link {
Expand Down
33 changes: 33 additions & 0 deletions src/about/team/TeamMember.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
VTIconCodePen,
VTIconGitHub,
VTIconGlobe,
VTIconHeart,
VTIconLink,
VTIconLinkedIn,
VTIconMapPin,
Expand All @@ -24,6 +25,10 @@ const avatarUrl = computed(() => {

<template>
<article class="TeamMember">
<VTLink v-if="member.sponsor" class="sponsor" :href="member.sponsor" no-icon>
<VTIconHeart class="sponsor-icon" /> Sponsor
</VTLink>

<figure class="avatar">
<img class="avatar-img" :src="avatarUrl" :alt="`${member.name}'s Profile Picture`">
</figure>
Expand Down Expand Up @@ -142,6 +147,7 @@ const avatarUrl = computed(() => {

<style scoped>
.TeamMember {
position: relative;
background-color: var(--vt-c-bg-soft);
transition: background-color 0.5s;
}
Expand All @@ -158,6 +164,33 @@ const avatarUrl = computed(() => {
}
}
.sponsor {
position: absolute;
top: 16px;
right: 16px;
display: flex;
align-items: center;
border: 1px solid #fd1d7c;
border-radius: 4px;
padding: 4px 8px;
font-size: 12px;
font-weight: 500;
color: #fd1d7c;
transition: color 0.25s, background-color 0.25s;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice touch here! 🙌

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

}
.sponsor:hover {
color: var(--vt-c-white);
background-color: #fd1d7c;
}
.sponsor-icon {
margin-right: 6px;
width: 14px;
height: 14px;
fill: currentColor;
}
.avatar {
flex-shrink: 0;
padding: 32px 32px 0;
Expand Down
6 changes: 4 additions & 2 deletions src/about/team/members-core.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"socials": {
"github": "yyx990803",
"twitter": "youyuxi"
}
},
"sponsor": "https://github.com/sponsors/yyx990803"
},
{
"name": "Ben Hong",
Expand Down Expand Up @@ -478,7 +479,8 @@
"socials": {
"github": "kiaking",
"twitter": "KiaKing85"
}
},
"sponsor": "https://github.com/sponsors/kiaking"
},
{
"name": "Anthony Fu",
Expand Down