Skip to content

Commit c4ae40c

Browse files
authored
Fixed alumni Card responsivity for tablet/mobile (#1143)
In this PR, I adjusted the styling of the Alumni Cards to be more responsive to different screen sizes and handle long text better. BEFORE: Right now you can see that depending on how long some of the words are, the spacing of the fields is uneven. ![Screenshot 2026-02-24 at 8.45.06 PM.png](attachment:0f4abc19-5d4e-4cee-8076-a7f10f3db01a:Screenshot_2026-02-24_at_8.45.06_PM.png) - As is, it’s not a huge issue, but when the screen changes sizes then it starts getting weird: ![Screenshot 2026-02-24 at 8.49.32 PM.png](attachment:dd8290c6-4b89-4ead-8f84-df0d12e90a97:Screenshot_2026-02-24_at_8.49.32_PM.png) My PR changes the layout of the cards different by screen siz - Large/laptop: keep as image on left then 2x3 layout of fields - Medium/tablet: keep as image on left then 3x2 layout of fields - Small/mobile: image on top and then 3x2 layout of fields below To test this, I would try messing with the screen widths and seeing how they funtion. I would run through searching through alums and filters to see if tehre are also any other edge cases that break. One thing to note, is that on tablet, the filter bar on the left takes up a lot of space. I believe this is out of scope for this specific task as it lies within the Map layout as opposed to just the Alumni Card Component.
1 parent 03c6e30 commit c4ae40c

4 files changed

Lines changed: 290 additions & 121 deletions

File tree

frontend/src/components/Alumni/Alumni.module.css

Lines changed: 118 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@
9292
align-items: flex-start;
9393
}
9494

95+
.filterToggleWrapper {
96+
display: none;
97+
}
98+
9599
.filtersSidebar {
96100
width: 225px;
97101
display: flex;
@@ -234,18 +238,12 @@
234238
}
235239

236240
.infoGrid {
237-
display: flex;
238-
gap: 44px;
241+
display: grid;
242+
grid-template-columns: repeat(3, 1fr);
243+
gap: 1rem;
239244
flex-wrap: wrap;
240245
}
241246

242-
.infoColumn {
243-
display: flex;
244-
flex-direction: column;
245-
gap: 10px;
246-
min-width: 83px;
247-
}
248-
249247
.infoItem {
250248
display: flex;
251249
flex-direction: column;
@@ -262,6 +260,8 @@
262260
font-size: 12px;
263261
font-weight: 500;
264262
color: #000;
263+
word-break: break-word;
264+
overflow-wrap: break-word;
265265
}
266266

267267
.socialIcons {
@@ -284,3 +284,112 @@
284284
.socialLink:hover {
285285
color: #4183c4;
286286
}
287+
288+
.filterOverlay {
289+
position: fixed;
290+
inset: 0;
291+
background: rgba(0, 0, 0, 0.4);
292+
z-index: 2000;
293+
display: flex;
294+
align-items: flex-end;
295+
}
296+
297+
.filterModal {
298+
background: var(--bg-default);
299+
width: 100%;
300+
border-radius: 12px 12px 0 0;
301+
max-height: 80vh;
302+
display: flex;
303+
flex-direction: column;
304+
}
305+
306+
.filterModalHeader {
307+
display: flex;
308+
justify-content: space-between;
309+
align-items: center;
310+
padding: 16px;
311+
border-bottom: 1px solid var(--border-default);
312+
}
313+
314+
.filterModalBody {
315+
padding: 16px;
316+
overflow-y: auto;
317+
display: flex;
318+
flex-direction: column;
319+
gap: 20px;
320+
}
321+
322+
.filterModalFooter {
323+
padding: 16px;
324+
border-top: 1px solid var(--border-default);
325+
display: flex;
326+
}
327+
328+
.filterModalFooter > * {
329+
flex: 1;
330+
}
331+
332+
@media (max-width: 768px) {
333+
.filterToggleWrapper {
334+
display: block;
335+
}
336+
337+
.filtersSidebar {
338+
display: none;
339+
}
340+
341+
.topBarSpacer {
342+
display: none;
343+
}
344+
345+
.searchContainer {
346+
max-width: none;
347+
}
348+
349+
.searchInput {
350+
flex: 1;
351+
min-width: 0;
352+
width: auto;
353+
}
354+
355+
.searchInput input {
356+
min-width: 0 !important;
357+
width: 100% !important;
358+
}
359+
.alumniCard {
360+
flex-direction: column;
361+
align-items: left;
362+
}
363+
364+
.profileImage {
365+
width: 80px !important;
366+
height: 80px !important;
367+
}
368+
369+
.cardContent {
370+
width: 100%;
371+
}
372+
373+
.infoGrid {
374+
display: grid;
375+
grid-template-columns: 1fr 1fr;
376+
gap: 10px;
377+
}
378+
379+
.socialIcons {
380+
align-self: flex-end;
381+
}
382+
}
383+
384+
@media (max-width: 440px) {
385+
.infoGrid {
386+
display: grid;
387+
grid-template-columns: 1fr;
388+
gap: 10px;
389+
}
390+
.infoItem {
391+
display: flex;
392+
flex-direction: row;
393+
gap: 2px;
394+
}
395+
}

0 commit comments

Comments
 (0)