diff --git a/src/app/components/MobileMenu.tsx b/src/app/components/MobileMenu.tsx
index 1f703b7..cce51f1 100644
--- a/src/app/components/MobileMenu.tsx
+++ b/src/app/components/MobileMenu.tsx
@@ -31,19 +31,21 @@ export default function MobileMenu() {
}
return (
-
+ >
)
}
diff --git a/src/app/components/SearchBar.tsx b/src/app/components/SearchBar.tsx
index 20f7eec..a1dfee0 100644
--- a/src/app/components/SearchBar.tsx
+++ b/src/app/components/SearchBar.tsx
@@ -25,10 +25,10 @@ export default function SearchBar({
}
return (
-
+
Search
diff --git a/src/app/components/mobileMenu.module.css b/src/app/components/mobileMenu.module.css
index 06d7ef9..ba6fdc9 100644
--- a/src/app/components/mobileMenu.module.css
+++ b/src/app/components/mobileMenu.module.css
@@ -1,15 +1,13 @@
.menu {
- @apply overflow-hidden left-[0] top-[235px] z-10 absolute bg-slate-200;
- @apply duration-300;
- height: fit-content;
- padding-bottom: 10px;
+ @apply overflow-hidden top-[235px] z-10 absolute bg-slate-200;
+ height: 180px;
transition: height 0.2s ease-in-out;
width: 100vw;
- right: 0;
+ left: 0;
}
.search-bar {
- @apply w-full flex justify-center z-10 px-4 py-2 bg-slate-300;
+ @apply z-10 mt-2 mx-[2px] sm:m-2;
}
.search-bar button {
@@ -18,5 +16,4 @@
.menu-hidden {
height: 0;
- padding-bottom: 0;
}
diff --git a/src/app/db/data.ts b/src/app/db/data.ts
index a7270dd..73848b6 100644
--- a/src/app/db/data.ts
+++ b/src/app/db/data.ts
@@ -415,7 +415,7 @@ export const authors: Readonly<{ [key: string]: Author }> = {
'Student@srvhs',
],
image: '/img/profiles/wlin.jpg',
- nationality: ['twn', 'chn', 'usa'],
+ nationality: ['twn', 'chn', 'jpn', 'usa'],
formerAffiliations: ['Intern@raid-zero'],
bio: 'Hi, I am Kaito or Warren. I am a Self-taught programmer and engineer. I go around doing dumb things such as my projects. I have a dream of building a community. I am currently part of many projects.',
website: 'https://kaitotlex.carrd.co/',
@@ -442,7 +442,7 @@ export const authors: Readonly<{ [key: string]: Author }> = {
'Mentor@team-1280',
],
formerAffiliations: ['Captain@team-1280', 'Student@srvhs'],
- nationality: ['usa'],
+ nationality: ['irl', 'usa'],
image: '/img/profiles/edanko.jpg',
},
arvenkatesh: {
@@ -742,6 +742,11 @@ export const nationalities: Readonly<{ [key: string]: Nationality }> = {
demonym: 'Filipino',
flag: 'https://upload.wikimedia.org/wikipedia/commons/thumb/9/99/Flag_of_the_Philippines.svg/2880px-Flag_of_the_Philippines.svg.png',
},
+ irl: {
+ name: 'Republic of Ireland',
+ demonym: 'Irish',
+ flag: 'https://upload.wikimedia.org/wikipedia/commons/4/45/Flag_of_Ireland.svg',
+ },
unknown: {
name: 'Undetermined',
demonym: 'Undetermined',
diff --git a/src/app/page.tsx b/src/app/page.tsx
index 7e41dbd..480b3ad 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -1,28 +1,65 @@
import Link from 'next/link'
-import { documents, authors, affiliations } from './db/data'
+import { documents, authors, affiliations, Author } from './db/data'
import News from './components/News'
import RandomDocs from './components/RandomDocs'
import RecentDocuments from './components/RecentDocuments'
+function sortAuthorsByDocumentsPublished(authors: {
+ [key: string]: Author
+}): { id: string; author: Author }[] {
+ // Initialize a map to count documents for each author
+ const authorDocumentCount: { [key: string]: number } = {}
+
+ // Iterate over documents to count the number for each author
+ Object.values(documents).forEach((document) => {
+ document.manifest.authors.forEach((authorId) => {
+ if (authorDocumentCount[authorId]) {
+ authorDocumentCount[authorId] += 1
+ } else {
+ authorDocumentCount[authorId] = 1
+ }
+ })
+ })
+
+ // Convert the authors object into an array of objects including the author ID
+ const authorsWithId = Object.keys(authors).map((id) => ({
+ id,
+ author: authors[id],
+ count: authorDocumentCount[id] || 0, // Include the count for sorting
+ }))
+
+ // Sort authors by their document count in descending order
+ authorsWithId.sort((a, b) => b.count - a.count)
+
+ // Return the sorted array, excluding the count property
+ return authorsWithId.map(({ id, author }) => ({ id, author }))
+}
+
export default function Home() {
const AuthorDisplay = () => {
- return Object.entries(authors).map(([author, data], index) => {
- let affiliationSlug = data.affiliation[0].split('@')[1]
- let affiliation = affiliations[affiliationSlug]
- return (
-
-
- {data.name.first}
- {data.name.nickname ? ` "${data.name.nickname}" ` : ' '}
- {data.name.last}
- {' '}
- of{' '}
-
- {affiliation.short}
-
-
- )
- })
+ return (
+
+ {sortAuthorsByDocumentsPublished(authors).map(({ id, author }) => {
+ let data = author
+
+ let affiliationSlug = data.affiliation[0].split('@')[1]
+ let affiliation = affiliations[affiliationSlug]
+ return (
+
+
+ {data.name.first}
+ {data.name.nickname ? ` "${data.name.nickname}" ` : ' '}
+ {data.name.last}
+ {' '}
+ of{' '}
+
+ {affiliation.short}
+
+
+ )
+ })}
+
+ )
}
return (
@@ -58,7 +95,7 @@ export default function Home() {
- Our esteemed faculty and alumni
+ Our esteemed faculty and alumni (ranked by research output)
diff --git a/src/app/search/page.tsx b/src/app/search/page.tsx
index a88aa7d..778f348 100644
--- a/src/app/search/page.tsx
+++ b/src/app/search/page.tsx
@@ -42,7 +42,7 @@ const SearchResult = ({
return (
diff --git a/src/app/styles/cardEffects.module.css b/src/app/styles/cardEffects.module.css
index dba28e2..daaa064 100644
--- a/src/app/styles/cardEffects.module.css
+++ b/src/app/styles/cardEffects.module.css
@@ -1,12 +1,12 @@
/* creates a 3D card effect using a pseudo element for performance reasons */
-.card {
+.card-large {
@apply shadow-sm shadow-slate-300;
/* box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); */
transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
position: relative;
}
-.card::after {
+.card-large::after {
@apply shadow-lg shadow-slate-500;
content: '';
z-index: -1;
@@ -19,10 +19,37 @@
left: 0;
}
-.card:hover {
+.card-large:hover {
transform: scale(1.02, 1.02);
}
-.card:hover::after {
+.card-large:hover::after {
+ opacity: 1;
+}
+
+.card-small {
+ @apply shadow-sm shadow-slate-300;
+ /* box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); */
+ transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
+ position: relative;
+}
+.card-small::after {
+ @apply shadow-md shadow-slate-500;
+ content: '';
+ z-index: -1;
+ transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
+ position: absolute;
+ opacity: 0;
+ width: 100%;
+ height: 100%;
+ top: 0;
+ left: 0;
+}
+
+.card-small:hover {
+ transform: scale(1.08, 1.08);
+}
+
+.card-small:hover::after {
opacity: 1;
}