File tree Expand file tree Collapse file tree 3 files changed +35
-2
lines changed Expand file tree Collapse file tree 3 files changed +35
-2
lines changed Original file line number Diff line number Diff line change 1+ <% items .forEach (item => {
2+ if (item .title === " Team Members" ) {
3+ // Update this to the number of initial members to keep unsorted
4+ const m = 2 ;
5+
6+ // Separate the first m members
7+ const firstMembers = item .members .slice (0 , m);
8+ const remainingMembers = item .members .slice (m);
9+
10+ // Sort the remaining members by last name
11+ remainingMembers .sort ((a , b ) => {
12+ const lastNameA = a .name .split (' ' ).pop ().toLowerCase ();
13+ const lastNameB = b .name .split (' ' ).pop ().toLowerCase ();
14+ return lastNameA .localeCompare (lastNameB);
15+ });
16+
17+ // Recombine the arrays: unsorted first m members + sorted remaining members
18+ item .members = firstMembers .concat (remainingMembers);
19+ } else {
20+ // Sort all members by last name if title is not "Team Members"
21+ item .members .sort ((a , b ) => {
22+ const lastNameA = a .name .split (' ' ).pop ().toLowerCase ();
23+ const lastNameB = b .name .split (' ' ).pop ().toLowerCase ();
24+ return lastNameA .localeCompare (lastNameB);
25+ });
26+ }
27+ }); %>
28+
129<!-- ::: {.panel-tabset} -->
230<% for (const item of items) { % >
331
Original file line number Diff line number Diff line change 217217 - linkedin : https://www.linkedin.com/in/shravangoswami/
218218219219
220-
221-
220+ - name : Penelope Yong
221+ image : penelope-yong.jpg
222+ university : The Alan Turing Institute
223+ links :
224+ - github : https://github.com/penelopeysm
225+ 226+
222227# GSOC Contributors:
223228
224229- title : Google Summer of Code Students
You can’t perform that action at this time.
0 commit comments