Skip to content

Commit efc6ba5

Browse files
committed
Updated President avatars
1 parent aa58de5 commit efc6ba5

File tree

2 files changed

+35
-23
lines changed

2 files changed

+35
-23
lines changed

components/CoPresident.jsx

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@ import { SwiperSlide } from 'swiper/react';
33
import Carousel from './Carousel';
44
import 'swiper/css';
55
import 'swiper/css/navigation';
6-
import Avatar from './Avatar';
6+
import Avatar from './PresidentAvatar';
77
const CAROUSEL_CONTAINER = 'president-carousel text-white rounded-lg w-[20rem] h-full md:w-4/5 swiper-button-white flex justify-center items-center';
88
const PRESIDENT_TILE =
9-
'bg-[#A689FF] bg-opacity-50 w-[20rem] h-[70rem] md:h-[20rem] rounded-lg items-center p-14 lg:p-10 flex flex-col md:w-4/5 md:flex-row';
9+
'bg-[#A689FF] bg-opacity-50 w-[20rem] h-[70rem] md:h-[25rem] rounded-lg items-center p-14 lg:p-10 flex flex-col md:w-4/5 md:flex-row';
1010

1111

1212

1313
const President = [[{
1414
name: "Jane Doe",
1515
position: "Co-Pres",
1616
year: "2025",
17-
previousRole: "Events team",
17+
currRole: "current job",
1818
testimonial: "Wow I love this club",
1919
linkedin: "random link",
2020
pfp: {
@@ -30,7 +30,7 @@ const President = [[{
3030
name: "John Doe",
3131
position: "Co-Pres",
3232
year: "2025",
33-
previousRole: "Events team",
33+
currRole: "Events team",
3434
testimonial: "Vitae eget venenatis rhoncus aliquet curabitur mauris, sed turpis nulla. Neque molestie mi placerat ultrices sit in sit.",
3535
linkedin: "random link",
3636
pfp: {
@@ -59,28 +59,12 @@ const President = [[{
5959
},
6060
classes: "text-[#7055FD]",
6161
},
62-
{
63-
name: "John Doe",
64-
position: "Co-Pres",
65-
year: "2025",
66-
previousRole: "Events team",
67-
testimonial: "Vitae eget venenatis rhoncus aliquet curabitur mauris, sed turpis nulla. Neque molestie mi placerat ultrices sit in sit.",
68-
linkedin: "random link",
69-
pfp: {
70-
fields: {
71-
file: {
72-
url: "//t3.ftcdn.net/jpg/05/16/27/58/360_F_516275801_f3Fsp17x6HQK0xQgDQEELoTuERO4SsWV.jpg"
73-
}
74-
}
75-
},
76-
classes: "text-[#7055FD]",
77-
}
7862
]];
7963

80-
const PresidentTile = ({ name, linkedin, pfp, classes, testimonial, position }) => {
64+
const PresidentTile = ({ name, linkedin, pfp, classes, testimonial, position, currRole }) => {
8165
return (
8266
<div className={PRESIDENT_TILE}>
83-
<Avatar key={name} {...{name, linkedin, pfp, classes, position}}></Avatar>
67+
<Avatar key={name} {...{name, linkedin, pfp, classes, position, currRole}}></Avatar>
8468
<p className="text-[1.1rem] font-light italic leading-7 mx-auto md:ml-14 md:mb-24 md:text-[1.3rem] lg:text-[1.5rem] md:p-10 text-[#000000]">
8569
<span className="text-[2rem] font-extrabold">&quot;</span>
8670
{testimonial}
@@ -99,7 +83,7 @@ const CoPresident = () => {
9983
<div className='bg-white w-full rounded-3xl h-full flex flex-col justify-center items-center gap-10 py-20'>
10084
<div className='text-[#000000] text-4xl absolute top-5 left-32'>{president[0].year}</div>
10185
<PresidentTile {...president[0]} />
102-
<PresidentTile {...president[1]} />
86+
{president[1] && <PresidentTile {...president[1]} />}
10387
</div>
10488
</SwiperSlide>
10589
))}

components/PresidentAvatar.jsx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import Image from 'next/image';
2+
import { faLinkedin } from '@fortawesome/free-brands-svg-icons';
3+
import FontAwesomeLink from './FontAwesomeLink';
4+
5+
const PROFILE_CONTAINER = 'flex flex-col items-center m-10';
6+
7+
const Avatar = ({ name, linkedin, position, pfp, classes, currRole, profileContainerClasses = '' }) => {
8+
const img = 'https:' + pfp.fields.file.url;
9+
return (
10+
<div className={`${PROFILE_CONTAINER} ${profileContainerClasses}`}>
11+
<div className={`w-28 h-28 sm:w-48 sm:h-48 rounded-full relative overflow-hidden`}>
12+
<Image src={img} alt={name} layout="fill" objectFit="contain" unoptimized={true} />
13+
</div>
14+
<h2 className={`text-[#7055FD] text-xs sm:text-base font-semibold mt-3 ${classes}`}>{name}</h2>
15+
<h2 className={`text-[#7055FD] text-xs sm:text-base font-medium ${classes}`}>{position}</h2>
16+
{currRole && (
17+
<h2
18+
className={`text-[#7055FD] text-xs sm:text-base font-medium${classes}`}
19+
>
20+
{currRole}
21+
</h2>
22+
)}
23+
{linkedin && <FontAwesomeLink username={linkedin} icon={faLinkedin} className={`${classes}`} />}
24+
</div>
25+
);
26+
};
27+
28+
export default Avatar;

0 commit comments

Comments
 (0)