Skip to content

Commit fed2e49

Browse files
authored
Merge pull request #147 from BUGS-NYU/ui-changes
updated ui on website for teams and events
2 parents a76cfc0 + 656012a commit fed2e49

File tree

9 files changed

+129
-45
lines changed

9 files changed

+129
-45
lines changed

src/components/EventsList.tsx

Lines changed: 52 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -19,41 +19,65 @@ export const getDateText = (event: Event) => {
1919
};
2020

2121
const EventsList = ({ events, count }: EventsListProps) => {
22+
// Slice events array if count is provided
2223
events = events.slice(0, count);
2324
if (events.length === 0) return null;
2425

2526
return (
26-
<>
27-
<div className='grid gap-12 grid-cols-1 sm:grid-cols-2'>
28-
{events.map((event) => {
29-
/* If imgsList or shortDescription is defined, this event will have its own page */
30-
const hasOwnPage = event.imgsList || event.shortDescription;
31-
32-
return <Card shadow='none'
33-
link={hasOwnPage ? `/event?index=${event.eventIndex}` : undefined}
34-
key={event.title}>
35-
<div className='-m-8 mb-0'>
36-
<img className='w-full h-48 rounded-t-lg object-cover' src={event.cover} alt='' />
27+
// Grid layout: 1 column on mobile, 2 on medium screens, 3 on large
28+
<div className='grid gap-8 grid-cols-1 md:grid-cols-2 lg:grid-cols-3'>
29+
{events.map((event) => {
30+
const hasOwnPage = event.imgsList || event.shortDescription;
31+
const isPastEvent = new Date(event.date) < new Date();
32+
33+
return (
34+
<Card
35+
shadow='none'
36+
link={hasOwnPage ? `/event?index=${event.eventIndex}` : undefined}
37+
key={event.title}
38+
>
39+
{/* Event image container */}
40+
<div className='-mx-8 -mt-8'>
41+
<img
42+
className='w-full h-[225px] object-cover rounded-t-lg'
43+
src={event.cover}
44+
alt=''
45+
/>
3746
</div>
38-
<div className='flex justify-between items-center p-2 pt-3'>
39-
<h3 className='text-xl font-bold'>{event.title}</h3>
40-
{hasOwnPage ? <div className='group-hover:bg-neutral-600 border-2 px-3 py-2 text-lg rounded-md transition-colors'> View </div> : null}
47+
48+
{/* Card content wrapper */}
49+
<div className='p-4'>
50+
{/* Title and view button container */}
51+
<div className='flex justify-between items-start mb-4'>
52+
<h3 className='text-xl font-bold leading-tight'>{event.title}</h3>
53+
{hasOwnPage && (
54+
<button className='ml-4 group-hover:bg-neutral-600 border-2 px-3 py-1 text-sm rounded-md transition-colors'>
55+
View
56+
</button>
57+
)}
58+
</div>
59+
60+
{/* Event details for upcoming events */}
61+
{!isPastEvent && (
62+
<ul className='text-zinc-600 dark:text-zinc-400 space-y-2 mb-4'>
63+
<li className='flex items-center gap-x-2'>
64+
<Clock className='flex-shrink-0 h-5 w-5' />
65+
<span>{getDateText(event)}</span>
66+
</li>
67+
<li className='flex items-center gap-x-2'>
68+
<PinAlt className='flex-shrink-0 h-5 w-5' />
69+
<span>{event.location}</span>
70+
</li>
71+
</ul>
72+
)}
73+
74+
{/* Event description */}
75+
<p className='text-sm leading-relaxed'>{event.description}</p>
4176
</div>
42-
<ul className='text-zinc-600 dark:text-zinc-400'>
43-
<li className='my-2 flex gap-x-2'>
44-
<Clock className='flex-shrink-0 inline-block' />
45-
{getDateText(event)}
46-
</li>
47-
<li className='my-2 flex gap-x-2'>
48-
<PinAlt className='flex-shrink-0 inline-block' />
49-
{event.location}
50-
</li>
51-
</ul>
52-
<p className='mt-4'>{event.description}</p>
5377
</Card>
54-
})}
55-
</div>
56-
</>
78+
);
79+
})}
80+
</div>
5781
);
5882
};
5983

src/components/NavBar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function NavBar() {
4141
<button
4242
className={`${currentTheme === "light" ? "text-black" : "text-white"} flex w-10 h-10 items-center justify-center`}
4343
onClick={toggleMobileMenu}>
44-
{isMobileMenuOpen ? <Cancel /> : <Menu />}
44+
{isMobileMenuOpen ? <Cancel width={24} height={24} onPointerEnterCapture={undefined} onPointerLeaveCapture={undefined} /> : <Menu width={24} height={24} onPointerEnterCapture={undefined} onPointerLeaveCapture={undefined} />}
4545
</button>
4646
</div>
4747

src/data/events.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,33 @@ export interface Event {
1919
}
2020

2121
export const EVENTS: Event[] = [
22+
{
23+
title: 'Bugs x HRT',
24+
description: 'learn about the role of open source in the financial sector from kamen yotov, a tandon professor.',
25+
date: new Date('September 24, 2024'),
26+
startTime: '5:00 PM',
27+
endTime: '6:30 PM',
28+
location: 'WWH Room 101',
29+
cover: '/images/events/fall-2024/bugs_HRT.png',
30+
},
31+
{
32+
title: 'Bugs End of Semester Party',
33+
description: 'join us at our end of semester party and relax with some boba before finals week',
34+
date: new Date('May 3, 2024'),
35+
startTime: '5:00 PM',
36+
endTime: '6:00 PM',
37+
location: 'WWH Room 101',
38+
cover: '/images/events/end_of_semester_bugs.png',
39+
},
40+
{
41+
title: 'Bugs x Google Life of a Feature',
42+
description: 'learn about the deisgn and development cycle for creating new features for large projects',
43+
date: new Date('April 26, 2024'),
44+
startTime: '3:30 PM',
45+
endTime: '5:00 PM',
46+
location: 'WWH Room 101',
47+
cover: '/images/events/bugs_google_life_of_a_feature.png',
48+
},
2249
{
2350
title: 'BUGS x Girls Who Code SQL Workshop',
2451
description: 'learn about the basics of SQL query and create an employee check-in system! free food, drinks, and database knowledge',

src/data/team.ts

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,40 @@ export interface TeamMember {
33
description: string;
44
profileImg: string;
55
role: string;
6+
interests?: string[];
67
}
78

89
export const TEAM: TeamMember[] = [
910
{
1011
name: 'Abigail Zhou',
1112
description:
12-
'Abigail is a senior majoring in CS at CAS with an interest in operating systems and machine learning. She\'s currently exploring the finance industry and enjoys trying new restaurants and running in her free time!!',
13+
'Abigail is a senior majoring in CS at CAS. She enjoys trying new restaurants and running in her free time!',
1314
profileImg: '/images/team/abigal.jpg',
1415
role: 'President',
16+
interests: ["Operating Systems", "Machine Learning", "Finance"]
1517
},
1618
{
1719
name: 'Alex Ying',
1820
description:
19-
'Alex is a senior studying CS at Tandon. He enjoys skiing, rock climbing, doing escape rooms, and learning about cool algorithms in his free time. He is currently learning how to juggle.',
21+
'Alex is a senior studying CS at Tandon. He enjoys skiing, rock climbing, doing escape rooms in his free time. He is currently learning how to juggle.',
2022
profileImg: '/images/team/alexyi.jpg',
2123
role: 'Lead Event Coordinator',
24+
interests: ["Cool Algorithms"]
2225
},
2326
{
2427
name: 'Rishabh Verma',
2528
description:
26-
'Rishabh is a 2nd year MS CS student at NYU Tandon. In his free time, he likes to learn more about financial markets, algorithmic trading strategies, and system design.',
29+
'Rishabh is a 2nd year MS CS student at NYU Tandon. In his free time, he likes to learn more about algorithmic trading strategies',
2730
profileImg: '/images/team/rishabh.jpg',
2831
role: 'Lead Developer',
32+
interests: ["Financial Markets", "Systems Design"]
2933
},
3034
{
31-
name: 'Alex Jia',
32-
description:
33-
'Hello everyone my name is Alex, I am a Sophomore who is majoring in computer science and mathematics at CAS. I was born in Xi’an and raised in Seattle, and I am interested in the intersection between image processing and machine learning. In my free time, I love hanging out with friends and discovering local restaurants with Beli!',
34-
profileImg: '/images/team/alexj.jpg',
35-
role: 'Developer',
35+
name: "Alex Jia",
36+
description: "Alex, a Sophomore majoring in computer science and mathematics at NYU CAS, explores the intersection of image processing and machine learning. Outside of academics, Alex enjoys discovering local restaurants and spending time with friends.",
37+
profileImg: "/images/team/alexj.jpg",
38+
role: "Developer",
39+
interests: ["Image Processing", "Machine Learning"]
3640
},
3741
{
3842
name: 'Grace He',
@@ -44,9 +48,10 @@ export const TEAM: TeamMember[] = [
4448
{
4549
name: 'Aryan Rai',
4650
description:
47-
'Aryan is a second-year master\'s student in CS at Tandon with a strong interest in machine learning and finance. He’s currently exploring the intersection of artificial intelligence and financial technology, focusing on how AI can transform the finance industry. In his free time, Aryan enjoys trekking, playing badminton, and seeking out new experiences around New York.',
51+
'Aryan is a second-year master\'s student in CS at Tandon. He’s currently exploring the intersection of artificial intelligence and financial technology, focusing on how AI can transform the finance industry. In his free time, Aryan enjoys trekking, playing badminton, and seeking out new experiences around New York.',
4852
profileImg: '/images/team/aryan.jpg',
4953
role: 'Event Coordinator',
54+
interests: ["Finance", "Machine Learning"]
5055
},
5156
{
5257
name: 'Angela Liu',
@@ -88,9 +93,10 @@ export const TEAM: TeamMember[] = [
8893
},
8994
{
9095
name: 'Faith Winford',
91-
description: 'Faith Winford is a sophomore studying CS and Philosophy at CAS. She’s interested in the intersection of AI and ethics. In her free time, she likes listening to music and going to concerts.',
96+
description: 'Faith Winford is a sophomore studying CS and Philosophy at CAS. In her free time, she likes listening to music and going to concerts.',
9297
profileImg: '/images/team/faith.jpg',
9398
role: 'Website Maintainer',
99+
interests: ["AI", "Product Managment","Software Design"]
94100
},
95101

96102
];

src/pages/about.tsx

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,41 @@ import Layout from '../components/Layout';
44
import Card from '../components/Card';
55
import { TEAM, TeamMember } from '../data/team';
66

7-
const TeamMemberCard: React.FC<TeamMember> = ({ name, description, profileImg, role }) => (
8-
<Card shadow='none' className='flex flex-col items-center'>
7+
const InterestTag: React.FC<{ interest: string }> = ({ interest }) => (
8+
<span className='inline-block px-3 py-1 text-sm rounded-full bg-purple-100 text-[#8900e1] dark:bg-purple-900 dark:text-purple-200 mr-2 mb-2'>
9+
{interest}
10+
</span>
11+
);
12+
13+
const TeamMemberCard: React.FC<TeamMember> = ({
14+
name,
15+
description,
16+
profileImg,
17+
role,
18+
interests = []
19+
}) => (
20+
<Card
21+
shadow='none'
22+
className='flex flex-col items-center group transition-transform duration-300 hover:-translate-y-1 p-0'
23+
>
924
<div className='w-full h-64 overflow-hidden rounded-t-lg'>
10-
<img className='w-full h-full object-cover' src={profileImg} alt='' />
25+
<img
26+
className='w-full h-full object-cover transition-transform duration-300 group-hover:scale-105'
27+
src={profileImg}
28+
alt={`${name} - ${role}`}
29+
loading="lazy"
30+
/>
31+
</div>
32+
<div className='mt-6 px-4 pb-4 w-full'>
33+
<h3 className='text-xl font-bold'>{name}</h3>
34+
<h3 className='text-xl' style={{ color: '#7b5aa6' }}>{role}</h3>
35+
<p className='mt-2 mb-3'>{description}</p>
36+
<div className='flex flex-wrap'>
37+
{interests.map((interest) => (
38+
<InterestTag key={interest} interest={interest} />
39+
))}
40+
</div>
1141
</div>
12-
<h3 className='mt-6 text-xl font-bold'>{name}</h3>
13-
<h3 className=' text-xl'>{role}</h3>
14-
<p className='mt-2'>{description}</p>
1542
</Card>
1643
);
1744

191 KB
Loading
266 KB
Loading
167 KB
Loading
409 KB
Loading

0 commit comments

Comments
 (0)