Skip to content

New feature Added hover effect on cards #1857

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
52 changes: 41 additions & 11 deletions website/src/pages/team.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import React from 'react';
import styled from 'styled-components';
import Layout from '@theme/Layout';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';

import Translate, { translate } from '@docusaurus/Translate';

import GitHubLogo from '../assets/icons/github-logo.svg';
Expand Down Expand Up @@ -41,6 +40,7 @@ const MembersContainer = styled.div`
grid-template-columns: repeat(2, 1fr);
}
`;

const MemberCard = styled.a`
border-radius: 0.75rem;
border: 1px solid #eee;
Expand All @@ -54,9 +54,12 @@ const MemberCard = styled.a`
min-width: calc(108px + 2rem);
cursor: pointer;
height: 100%;
transition: transform 0.2s ease, box-shadow 0.2s ease;
&:hover {
color: inherit;
transform: translateY(-5px);
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
text-decoration: none;
color: inherit;
}
`;

Expand All @@ -65,13 +68,15 @@ const Avatar = styled.img`
width: 108px;
border-radius: 50%;
`;

const MemberName = styled.div`
font-size: 1rem;
font-weight: 600;
margin-top: 12px;
margin-bottom: -4px;
line-height: 1rem;
`;

const Username = styled.div`
font-size: 0.8rem;
font-weight: 500;
Expand All @@ -82,6 +87,7 @@ const SectionTitle = styled.h2`
margin-bottom: 24px;
margin-top: 84px;
`;

const SectionSubtitle = styled.p`
opacity: 0.68;
margin-top: -12px;
Expand All @@ -92,6 +98,7 @@ const RepoCardsContainer = styled.div`
flex-wrap: wrap;
margin-left: -8px;
`;

const RepoCard = styled.a`
border-radius: 0.75rem;
border: 1px solid #eee;
Expand All @@ -102,13 +109,13 @@ const RepoCard = styled.a`
padding: 1rem;
margin: 8px;
cursor: pointer;
transition: all 0.3s;

transition: transform 0.2s ease, box-shadow 0.2s ease;
&:hover {
transform: translateY(-5px);
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
opacity: 0.98;
text-decoration: none;
}

svg {
margin-right: 8px;
transition: all 0.3s;
Expand All @@ -124,15 +131,18 @@ const ContributeCard = styled.div`
color: white;
padding: 2rem 2.4rem;
`;

const ContributeCardTitle = styled.div`
font-size: 2.4rem;
font-weight: 700;
`;

const ContributeCardSubtitle = styled.div`
opacity: 0.78;
font-size: 14px;
margin-top: 1rem;
`;

const ContributeCardButton = styled.a`
padding: 12px 24px;
font-size: 20px;
Expand Down Expand Up @@ -258,8 +268,7 @@ const Team: FC = () => {
<Avatar src={member.avatarUrl} />
<MemberName>{member.name}</MemberName>
<Username>
@
{member.username}
@{member.username}
</Username>
</MemberCard>
</div>
Expand All @@ -273,6 +282,7 @@ const Team: FC = () => {
</div>
);
});

const repoComponents = allRepos.map((repo) => (
<RepoCard
className="team-repocard"
Expand All @@ -285,21 +295,41 @@ const Team: FC = () => {
{repo}
</RepoCard>
));

return (
<Layout title={translate({ message: 'Team' })}>
<Page>
<PageTitle><Translate id="team.webpage.title.Team">Team</Translate></PageTitle>
<PageSubtitle><Translate id="team.webpage.title.DocumentSubtitle">We love open source.</Translate></PageSubtitle>
<PageSubtitle>
<Translate id="team.webpage.title.DocumentSubtitle">
We love open source.
</Translate>
</PageSubtitle>
{memberSections}
<SectionTitle><Translate id="team.webpage.content.Contributors">Contributors</Translate></SectionTitle>
<SectionTitle>
<Translate id="team.webpage.content.Contributors">Contributors</Translate>
</SectionTitle>
<SectionSubtitle>
<Translate id="team.webpage.content.ContributorsSub">
You can find all contributors of Apache APISIX from GitHub contribution
list.
</Translate>
</SectionSubtitle>
<RepoCardsContainer>{repoComponents}</RepoCardsContainer>

<SectionTitle>
<Translate id="team.webpage.content.ContributorOverTime">
Contributor Over Time
</Translate>
</SectionTitle>
<SectionSubtitle>
<Translate id="team.webpage.content.ContributorOverTimeNote">
Note: This graph contains contributors from all repos under Apache APISIX
</Translate>
</SectionSubtitle>
<img
src="https://contributor-graph-api.apiseven.com/contributors-svg?repo=apache/apisix&merge=true"
alt="Contributor Over Time"
/>
<ContributeCard>
<ContributeCardLeftSide>
<ContributeCardTitle>
Expand Down Expand Up @@ -337,4 +367,4 @@ const Team: FC = () => {
);
};

export default Team;
export default Team;
Loading