Skip to content

Commit 1f15390

Browse files
committed
Alum display update
1 parent 10d2497 commit 1f15390

File tree

3 files changed

+73
-27
lines changed

3 files changed

+73
-27
lines changed

src/app/page.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ import LabAlum from "@/components/people/LabAlum";
66
import Project from "@/components/projects/Project";
77
import Heading from "@/components/shared/Heading";
88
import Text from "@/components/shared/Text";
9-
import { PEOPLE, Role } from "@/content/people";
9+
import { PEOPLE, Role, RoleOrder } from "@/content/people";
1010
import { PROJECTS } from "@/content/projects";
1111
import BerkeleyMini from "@/../public/images/berkeley-mini.png";
1212

1313
const Index = () => {
1414
const [currentLabMembers, alumni] = partition(
1515
PEOPLE,
16-
(person) => person.role !== Role.Alumni
16+
(person) => !(person.alum)
1717
);
1818

1919
return (
@@ -70,16 +70,16 @@ const Index = () => {
7070
<section className="stack stack-lg p-4">
7171
<Heading level="h2">People</Heading>
7272
<div className="stack stack-sm">
73-
<div className="grid grid-cols-12 gap-5">
74-
{currentLabMembers.map((person) => {
73+
<div className="grid grid-cols-12 gap-10">
74+
{orderBy(currentLabMembers, [p => RoleOrder[p.role], p => p.name.trim().split(" ").slice(-1)[0]], ["asc", "asc"]).map((person) => {
7575
return <LabMember key={person.id} {...person} />;
7676
})}
7777
</div>
7878
</div>
7979
<div className="stack stack-sm">
8080
<Heading level="h3">Alums</Heading>
81-
<div className="grid grid-cols-12 gap-5">
82-
{alumni.map((person) => {
81+
<div className="grid grid-cols-12 gap-2">
82+
{orderBy(alumni, (p) => p.graduation, ["desc"]).map((person) => {
8383
return <LabAlum key={person.id} {...person} />;
8484
})}
8585
</div>

src/components/people/LabAlum.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,23 @@ type Props = Person;
77

88
const LabAlum: React.FC<Props> = ({ name, role, website, headshot }) => {
99
return (
10+
1011
<a
1112
href={website}
1213
target="_blank"
1314
rel="noopener noreferrer"
1415
className={cs(
15-
"stack-sm col-span-6 md:col-span-4 lg:col-span-3",
16+
"col-span-6 md:col-span-4 lg:col-span-3 flex items-center gap-2",
1617
website ? "transition-opacity hover:opacity-75" : ""
1718
)}
1819
>
20+
<Image
21+
src={headshot}
22+
alt={name}
23+
className="h-12 w-12 rounded object-cover shadow"
24+
/>
1925
<div className={cs(website ? "text-primary" : "text-black")}>
20-
<p className="text-sm font-bold">{name}</p>
21-
{role !== Role.Alumni ? <p className="text-xs italic">{role}</p> : null}
26+
<p className="text-sm font-bold">{name}, <span className="text-xs italic">{role.split(" ")[0]}</span></p>
2227
</div>
2328
</a>
2429
);

src/content/people.ts

Lines changed: 59 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,31 @@ import SKanosue from "@/../public/headshots/skanosue.jpg";
2222

2323
export enum Role {
2424
Faculty = "Faculty",
25-
PhDCandidate = "Ph.D. Candidate",
26-
PhdStudent = "Ph.D. Student",
27-
MScStudent = "M.Sc. Student",
25+
PhDCandidate = "PhD Candidate",
26+
PhdStudent = "PhD Student",
27+
MScStudent = "MS Student",
2828
UndergraduateStudent = "Undergraduate Student",
29-
UndergraduateAssistant = "Undergraduate Student Assistant",
30-
Alumni = "Alumni",
29+
StudentAssistant = "Assistant",
30+
OnLeave = "PhD Student (on leave)"
3131
}
32+
export const RoleOrder: Record<Role, number> = {
33+
[Role.Faculty]: 1,
34+
[Role.PhDCandidate]: 2,
35+
[Role.PhdStudent]: 3,
36+
[Role.MScStudent]: 4,
37+
[Role.UndergraduateStudent]: 5,
38+
[Role.StudentAssistant]: 6,
39+
[Role.OnLeave]: 7,
40+
};
3241

3342
export interface Person {
3443
id: string;
3544
name: string;
3645
role: Role;
3746
headshot: StaticImageData;
3847
website?: string;
48+
alum: Boolean;
49+
graduation?: number;
3950
}
4051

4152
export const PEOPLE = [
@@ -45,127 +56,157 @@ export const PEOPLE = [
4556
role: Role.Faculty,
4657
headshot: SChasins,
4758
website: "https://schasins.com/",
59+
alum: false,
4860
},
4961
{
5062
id: "rgarcia",
5163
name: "Rolando Garcia",
52-
role: Role.Alumni,
64+
role: Role.PhDCandidate,
5365
headshot: RGarcia,
5466
website: "https://rlnsanz.github.io/",
67+
alum: true,
68+
graduation: 2024
5569
},
5670
{
5771
id: "hhailunigatu",
5872
name: "Hellina Hailu Nigatu",
5973
role: Role.PhDCandidate,
6074
headshot: HHailuNigatu,
6175
website: "https://hhnigatu.github.io/",
76+
alum: false,
6277
},
6378
{
6479
id: "slim",
6580
name: "Slim Lim",
66-
role: Role.PhdStudent,
81+
role: Role.OnLeave,
6782
headshot: SLim,
6883
website: "https://slim.computer/",
84+
alum: false,
6985
},
7086
{
7187
id: "jlubin",
7288
name: "Justin Lubin",
7389
role: Role.PhDCandidate,
7490
headshot: JLubin,
7591
website: "https://jlubin.net",
92+
alum: false,
7693
},
7794
{
7895
id: "dcao",
7996
name: "David Minh-Duy Cao",
8097
role: Role.PhdStudent,
8198
headshot: DCao,
8299
website: "https://cao.sh",
100+
alum: false,
83101
},
84102
{
85103
id: "gmatute",
86104
name: "Gabriel Matute",
87-
role: Role.Alumni,
105+
role: Role.MScStudent,
88106
headshot: GMatute,
89107
website: "https://about.gmatute.dev/",
108+
alum: true,
90109
},
91110
{
92111
id: "erawn",
93112
name: "Eric Rawn",
94113
role: Role.PhdStudent,
95114
headshot: ERawn,
96115
website: "https://www.ericrawn.media/",
116+
alum: false,
97117
},
98118
{
99119
id: "pziegler",
100120
name: "Parker Ziegler",
101121
role: Role.PhdStudent,
102122
headshot: PZiegler,
103123
website: "https://parkerziegler.com/",
124+
alum: false,
104125
},
105126
{
106127
id: "djayagopal",
107128
name: "Dhanya Jayagopal",
108-
role: Role.Alumni,
129+
role: Role.MScStudent,
109130
headshot: DJayagopal,
131+
alum: true,
132+
graduation: 2022
110133
},
111134
{
112135
id: "jyim",
113136
name: "Jacob Yim",
114-
role: Role.Alumni,
137+
role: Role.MScStudent,
115138
headshot: JYim,
139+
alum: true,
140+
graduation: 2024
116141
},
117142
{
118143
id: "skanosue",
119144
name: "Sora Kanosue",
120-
role: Role.Alumni,
145+
role: Role.MScStudent,
121146
headshot: SKanosue,
122147
website: "https://skanosue.com",
148+
alum: true,
149+
graduation: 2024
123150
},
124151
{
125152
id: "lrennels",
126153
name: "Lisa Rennels",
127-
role: Role.Alumni,
154+
role: Role.MScStudent,
128155
headshot: LRennels,
129156
website: "https://lisarennels.com/",
157+
alum: true,
158+
graduation: 2024
130159
},
131160
{
132161
id: "adermirci",
133162
name: "Arda Demirci",
134-
role: Role.Alumni,
163+
role: Role.UndergraduateStudent,
135164
headshot: ADemirci,
136165
website: "https://www.linkedin.com/in/ardademirci14/",
166+
alum: true,
167+
graduation: 2022
137168
},
138169
{
139170
id: "rhicke",
140171
name: "Rebecca Hicke",
141-
role: Role.Alumni,
172+
role: Role.UndergraduateStudent,
142173
headshot: RHicke,
143174
website: "https://rmatouschekh.github.io/",
175+
alum: true,
176+
graduation: 2021
144177
},
145178
{
146179
id: "skim",
147180
name: "Selina Kim",
148-
role: Role.Alumni,
181+
role: Role.UndergraduateStudent,
149182
headshot: SKim,
183+
alum: true,
184+
graduation: 2022
150185
},
151186
{
152187
id: "rmishra",
153188
name: "Rajavi Mishra",
154-
role: Role.Alumni,
189+
role: Role.UndergraduateStudent,
155190
headshot: RMishra,
191+
alum: true,
192+
graduation: 2022
156193
},
157194
{
158195
id: "hperlstein",
159196
name: "Hannah Perlstein",
160-
role: Role.Alumni,
197+
role: Role.UndergraduateStudent,
161198
headshot: HPerlstein,
162199
website: "https://www.linkedin.com/in/hannah-perlstein/",
200+
alum: true,
201+
graduation: 2022
163202
},
164203
{
165204
id: "lrojas",
166205
name: "Liliana Rojas",
167-
role: Role.Alumni,
206+
role: Role.StudentAssistant,
168207
headshot: LRojas,
169208
website: "https://www.linkedin.com/in/liliana-rojasl/",
209+
alum: true,
210+
graduation: 2024
170211
},
171212
];

0 commit comments

Comments
 (0)