Skip to content
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

Isaiah/previous exec teams #549

Open
wants to merge 39 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
3995d7f
Update colors and styles for TeamSection component. Make the sldier s…
IsaiahA21 Oct 14, 2024
d16ba40
Update TeamPage component to include PreviousExecTeam section. Still …
IsaiahA21 Oct 15, 2024
2e057ed
Refactor PreviousExecTeam component to include pagination controls an…
IsaiahA21 Oct 19, 2024
208e1ce
Refactor PreviousExecTeam component styles and structure.
IsaiahA21 Oct 22, 2024
8b96172
added 2023-2024 team data
IsaiahA21 Nov 4, 2024
099fc5f
added all the previous team data
IsaiahA21 Nov 5, 2024
ae7b5a8
Refactored PreviousExecTeam style
IsaiahA21 Nov 15, 2024
ed34939
refactor code
IsaiahA21 Nov 17, 2024
2e14a60
Ran prettier
IsaiahA21 Nov 17, 2024
33e3702
Remove the Divider line. Made only 1 year visible at a time.
IsaiahA21 Nov 22, 2024
9b1191f
Merge branch 'main' into isaiah/previousTeams
IsaiahA21 Nov 22, 2024
8ba1112
Add Seisware sponsor logo and link to SponsorSection (#551)
IsaiahA21 Dec 12, 2024
1888728
Refactor PreviousExecTeam to include section for image of the prev ex…
IsaiahA21 Dec 13, 2024
7357597
added a lightgrey background to each previous exec member
IsaiahA21 Dec 14, 2024
542b3b8
ran prettier
IsaiahA21 Dec 14, 2024
0057c8f
Bump braces in the npm_and_yarn group across 1 directory
dependabot[bot] Dec 16, 2024
a664628
Bump ejs in the npm_and_yarn group across 1 directory
dependabot[bot] Dec 16, 2024
78ec916
Change YearButton from button to div and remove hover effects
IsaiahA21 Dec 18, 2024
17ab1a7
added the acutal previous team pictures
IsaiahA21 Jan 19, 2025
35de2c1
Updated Ryan's Picture (#548)
Sahitiakella Jan 30, 2025
2acf97d
Update colors and styles for TeamSection component. Make the sldier s…
IsaiahA21 Oct 14, 2024
e02dde0
Update TeamPage component to include PreviousExecTeam section. Still …
IsaiahA21 Oct 15, 2024
25f1f0f
Refactor PreviousExecTeam component to include pagination controls an…
IsaiahA21 Oct 19, 2024
87970d2
Refactor PreviousExecTeam component styles and structure.
IsaiahA21 Oct 22, 2024
b6046c4
added 2023-2024 team data
IsaiahA21 Nov 4, 2024
0d40c6e
added all the previous team data
IsaiahA21 Nov 5, 2024
9fa28be
Refactored PreviousExecTeam style
IsaiahA21 Nov 15, 2024
9d305b3
refactor code
IsaiahA21 Nov 17, 2024
e8c74e6
Ran prettier
IsaiahA21 Nov 17, 2024
1a7ca77
Remove the Divider line. Made only 1 year visible at a time.
IsaiahA21 Nov 22, 2024
fd66bcd
Refactor PreviousExecTeam to include section for image of the prev ex…
IsaiahA21 Dec 13, 2024
9da29e7
added a lightgrey background to each previous exec member
IsaiahA21 Dec 14, 2024
c113374
ran prettier
IsaiahA21 Dec 14, 2024
dd312f7
Change YearButton from button to div and remove hover effects
IsaiahA21 Dec 18, 2024
c6f450b
added the acutal previous team pictures
IsaiahA21 Jan 19, 2025
6acf1fd
wrapped functions in useCallback
IsaiahA21 Feb 4, 2025
b9034ef
Merge branch 'isaiah/previousTeams' of https://github.com/techstartuc…
IsaiahA21 Feb 4, 2025
39798e0
Refactor PreviousExecTeam component to simplify year selection logic
IsaiahA21 Feb 4, 2025
39d5c4c
Remove unused useEffect import
IsaiahA21 Feb 4, 2025
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
20 changes: 10 additions & 10 deletions package-lock.json

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

1 change: 1 addition & 0 deletions src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
--secondary-grey: #222222f2;
--toggle-green: #4dd6a8;
--toggle-blue: #61c3d4;
--toggle-earthGreen: #a4c639;
--title-size: clamp(1.4rem, calc(15vw + 1rem), 8rem);
--chonky-header-size: 4.75rem;
--thicc-subheading-size: 2.5rem;
Expand Down
107 changes: 107 additions & 0 deletions src/components/PreviousExecTeam/PreviousExecTeam.styles.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
import styled from "styled-components";

export const PrevTeamSection = styled.div`
margin-left: auto;
margin-right: auto;
padding-bottom: 2rem;
text-align: center;
background-color: white;

`;

export const SectionHeader = styled.div`
padding: 2rem 0;
font-size: 2.5rem;
color: black;
font-weight: 900;
text-align: center;
font-family: Inter, Tahoma, sans-serif;
line-height: 1;
`;

export const PaginationControl = styled.div`
display: flex;
/* border: 1px red solid; */
margin-left: auto;
margin-right: auto;
justify-content: center;
`;

export const ArrowButton = styled.button`
background-color: white;
border: none;
border-radius: 50%;
color: #333;
font-size: 1.5rem;
padding: 0.5rem 1rem;
cursor: pointer;
transition: background-color 0.3s;

&:hover {
background-color: #e0e0e0;
}

&:disabled {
cursor: not-allowed;
}
`;

export const YearButton = styled.div`
background-color: transparent;
border: 1px lightgray solid;
border-radius: 10px;
color: #333;
font-size: 1.2rem;
padding: 0.5rem 2rem;
margin: 0 0.3rem;
transition: color 0.3s;
`;

export const Carousel = styled.div`
width: 40%;
margin: 3rem auto;
@media(max-width: 768px) {
width: 80%;
}
`;

export const TeamList = styled.div`
max-width: 85%;
margin: 0 auto;
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 2rem;

@media (max-width: 768px) {
grid-template-columns: 1fr 1fr;
}
@media (max-width: 600px) {
grid-template-columns: 1fr;
}
`;

export const TeamMember = styled.div`
background-color: #f5f5f5;
border-radius: 0.5rem;
padding: 1rem 0rem;
`;

export const TeamHeader = styled.a`
font-size: 20px;
font-weight: bold;
margin: 0 0 10px 0;
text-decoration: none;
color: inherit;
transition: color 0.3s, text-decoration 0.3;
&:hover {
color: #4dd6a8;
text-decoration: underline;
}
`;

export const TeamRole = styled.p`
font-size: 16px;
margin: 0 0 5px 0;

`;
export const YearPagination = styled.div``;
121 changes: 121 additions & 0 deletions src/components/PreviousExecTeam/PreviousExecTeam.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
import React, { useState } from "react";
import * as S from "./PreviousExecTeam.styles";
import { prevExecTeamList, PrevExecTeam } from "./PreviousExecTeamsInfo";
import Divider from "components/Divider";
import {
faChevronLeft,
faChevronRight,
} from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { useCallback } from "react";



const PreviousExecTeam = () => {
const [selectedYear, setSelectedYear] = useState(
prevExecTeamList[prevExecTeamList.length - 1].year
);

const getSelectedYearIndex = useCallback((): number =>{
return prevExecTeamList.findIndex((data) => data.year === selectedYear)
},[selectedYear]);

const handleLeftArrow = useCallback(() => {
const selectedYearIndex = getSelectedYearIndex();
if (selectedYearIndex > 0) {
setSelectedYear(prevExecTeamList[selectedYearIndex - 1].year);
}
},[getSelectedYearIndex]);
const handleRightArrow = useCallback(() => {
const selectedYearIndex = getSelectedYearIndex();
if (selectedYearIndex < prevExecTeamList.length - 1) {
setSelectedYear(prevExecTeamList[selectedYearIndex + 1].year);
}
},[getSelectedYearIndex]);

return (
<S.PrevTeamSection>
<Divider />
<S.SectionHeader>Previous Executives</S.SectionHeader>
<S.PaginationControl>
<S.ArrowButton
className="arrow-button"
onClick={handleLeftArrow}
disabled={getSelectedYearIndex() === 0}
>
<FontAwesomeIcon
icon={faChevronLeft}
size="sm"
style={{ color: getSelectedYearIndex() === 0 ? "grey" : "black" }}
/>
</S.ArrowButton>
<S.YearPagination>
<S.YearButton>{selectedYear}</S.YearButton>
</S.YearPagination>
<S.ArrowButton
className="arrow-button"
onClick={handleRightArrow}
disabled={getSelectedYearIndex() === prevExecTeamList.length - 1}
>
<FontAwesomeIcon
icon={faChevronRight}
size="sm"
style={{
color:
getSelectedYearIndex() === prevExecTeamList.length - 1
? "grey"
: "black",
}}
/>
</S.ArrowButton>
</S.PaginationControl>

{prevExecTeamList
.filter((team) => team.year === selectedYear)
.map((team: PrevExecTeam) => {
return (
<>
<S.Carousel>
{team.picture ? (
<img
src={team.picture}
style={{
width: "100%",
height: "auto",
borderRadius: "0.75rem",
objectFit: "cover",
boxShadow: "0rem 1.5rem 2rem -1.5rem rgba(0, 0, 0, 0.7)",
}}
/>
) : (
<p>No picture available</p>
)}
</S.Carousel>
<S.TeamList>
{team.members.length > 0 && (
<>
{team.members.map((member, index) => (
<S.TeamMember key={index}>
<div style={{ justifyContent: "center" }}>
<S.TeamHeader
href={member.linkedin_url}
target="_blank"
rel="noopener noreferrer"
>
{member.name}
</S.TeamHeader>
<S.TeamRole>{member.role}</S.TeamRole>
</div>
</S.TeamMember>
))}
</>
)}
</S.TeamList>
</>
);
})}
</S.PrevTeamSection>
);
};

export default React.memo(PreviousExecTeam);
Loading