Skip to content

Commit e59ec14

Browse files
committed
added website links for teams
1 parent beac751 commit e59ec14

File tree

3 files changed

+34
-9
lines changed

3 files changed

+34
-9
lines changed

src/components/Team/Team.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const TeamSection = ({ title, members, showDivider = false }) => (
2323
description={member.description}
2424
imgPath={member.imgPath}
2525
ghLink={member.ghLink}
26+
websiteLink={member.websiteLink}
2627
team={member.team}
2728
/>
2829
</Col>

src/components/Team/TeamCard.js

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
import React from "react";
22
import Card from "react-bootstrap/Card";
33
import { BsGithub } from "react-icons/bs";
4+
import { FaLink } from "react-icons/fa";
45
import './team.css';
56

67
function TeamCard(props) {
78
const hasGitHub = props.ghLink && props.ghLink.trim() !== "" && props.ghLink !== "https://github.com";
9+
const hasWebsite = props.websiteLink && props.websiteLink.trim() !== "";
810

911
return (
1012
<Card className="team-card-view">
1113
<Card.Img variant="top" src={props.imgPath} alt="card-img" className="teamcard-img-top" loading="eager" />
12-
<Card.Body>
14+
<Card.Body className="flex flex-col h-full">
1315
<Card.Title className="team-card-title">
1416
{props.title}
17+
</Card.Title>
18+
{props.team && <div className="team-member-role">{props.team}</div>}
19+
<Card.Text className="team-card-description">{props.description}</Card.Text>
20+
<div className="mt-auto flex justify-center gap-8">
1521
{hasGitHub && (
1622
<a
1723
href={props.ghLink}
@@ -23,9 +29,18 @@ function TeamCard(props) {
2329
<BsGithub className="github-icon" />
2430
</a>
2531
)}
26-
</Card.Title>
27-
{props.team && <div className="team-member-role">{props.team}</div>}
28-
<Card.Text className="team-card-description">{props.description}</Card.Text>
32+
{hasWebsite && (
33+
<a
34+
href={props.websiteLink}
35+
target="_blank"
36+
rel="noopener noreferrer"
37+
className="website-link"
38+
aria-label={`${props.title}'s website`}
39+
>
40+
<FaLink className="website-icon" />
41+
</a>
42+
)}
43+
</div>
2944
</Card.Body>
3045
</Card>
3146
);

src/components/Team/team.css

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,22 +88,31 @@
8888
transform: scale(1.05) !important;
8989
}
9090

91-
.github-link {
91+
.github-link,
92+
.website-link {
9293
display: inline-block;
93-
margin-left: 10px;
94+
margin: 0 10px;
9495
color: var(--imp-text-color) !important;
9596
transition: color 0.3s ease !important;
9697
}
9798

98-
.github-link:hover {
99+
.github-link:hover,
100+
.website-link:hover {
99101
color: #b19cd9 !important;
100102
}
101103

102-
.github-icon {
103-
font-size: 1.2em;
104+
.github-icon,
105+
.website-icon {
106+
font-size: 1.5em;
104107
vertical-align: middle;
105108
}
106109

110+
.team-card-view .card-body {
111+
display: flex;
112+
flex-direction: column;
113+
height: 100%;
114+
}
115+
107116
/* Media queries for responsive image sizes */
108117
@media (max-width: 768px) {
109118
.teamcard-img-top {

0 commit comments

Comments
 (0)