Skip to content

Commit 9c8932b

Browse files
committed
Merge branch 'summer24' of https://github.com/MichiganDataScienceTeam/website-redesign into summer24
2 parents d2228c4 + da785c4 commit 9c8932b

21 files changed

+137
-66
lines changed

components/currentProjectCard.jsx

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const styles = {
4242
display: 'flex',
4343
flexDirection: 'row',
4444
backgroundColor: '#333',
45-
padding: '16px',
45+
padding: '25px',
4646
borderRadius: '8px',
4747
width: '100%',
4848
maxWidth: '600px',
@@ -52,31 +52,37 @@ const styles = {
5252
display: 'flex',
5353
flexDirection: 'column',
5454
alignItems: 'center',
55-
width: '100%',
55+
flex: 1,
5656
},
5757
projectInfo: {
58-
marginBottom: '16px',
58+
flex: '1 1 300px',
59+
alignItems: 'center',
60+
justifyContent: 'center',
5961
},
6062
projectImage: {
6163
borderRadius: '10%',
6264
objectFit: 'cover',
63-
width: 'auto',
64-
height: '100%',
65+
width: '100%',
66+
height: 'auto',
6567
},
6668
projectTitle: {
6769
marginTop: '16px',
6870
fontSize: '24px',
6971
fontWeight: 'bold',
7072
textAlign: 'center',
73+
color: 'white',
7174
},
7275
leadsInfo: {
7376
display: 'flex',
7477
flexDirection: 'column',
7578
alignItems: 'center',
79+
justifyContent: 'center',
80+
flex: '1 1 75px',
7681
},
7782
leadText: {
7883
fontSize: '20px',
7984
fontWeight: 'bold',
85+
color: 'white',
8086
},
8187
leadsContainer: {
8288
display: 'flex',
@@ -101,5 +107,6 @@ const styles = {
101107
textAlign: 'center',
102108
fontSize: '14px',
103109
fontWeight: '500',
110+
color: 'white',
104111
},
105112
};

components/projectCard.jsx

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ import Image from "next/image";
33
import Icon from "@/components/icon";
44

55
export default function ProjectCard({ project, basePath }) {
6-
const imagePath = `${basePath}/images/projects/${project.label.toLowerCase().split(" ").join("_")}.jpg`;
6+
const imagePath = `${basePath}/images/projects/${project.label
7+
.toLowerCase()
8+
.split(" ")
9+
.join("_")}.jpg`;
710
return (
811
<div className="text-left sm:text-center rounded bg-grey py-2 sm:py-4 px-2 sm:px-8 w-full sm:w-60 flex sm:block gap-8">
912
<Image
@@ -14,18 +17,28 @@ export default function ProjectCard({ project, basePath }) {
1417
alt={project.label}
1518
/>
1619
<div className="">
17-
<h3 className="mb-1 text-2xl font-bold tracking-tight">{project.label}</h3>
20+
<h3 className="mb-1 text-2xl font-bold tracking-tight">
21+
{project.label}
22+
</h3>
1823
<ul className="flex sm:justify-center mt-2 sm:mt-4 space-x-4">
1924
{project.github && (
2025
<li>
21-
<Link href={project.github} className="hover:text-gray" aria-label="Github Repo">
26+
<Link
27+
href={project.github}
28+
className="hover:text-gray"
29+
aria-label="Github Repo"
30+
>
2231
<Icon name="github" className="text-3xl" />
2332
</Link>
2433
</li>
2534
)}
2635
{project.googleSlides && (
2736
<li>
28-
<Link href={project.googleSlides} className="hover:text-gray" aria-label="Google Slides">
37+
<Link
38+
href={project.googleSlides}
39+
className="hover:text-gray"
40+
aria-label="Google Slides"
41+
>
2942
<Icon name="file-pdf" className="text-3xl" />
3043
</Link>
3144
</li>

config/communityImages.json

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
[
2-
{
3-
"name": "WN24 Project Expo",
4-
"image": "WN24_EXPO.JPG"
5-
},
6-
{
7-
"name": "WN24 Data Science Night",
8-
"image": "WN24_DSN.JPG"
9-
}
10-
]
11-
2+
{
3+
"name": "",
4+
"image": "WN24_EXPO.JPG"
5+
},
6+
{
7+
"name": "",
8+
"image": "WN24_DSN.JPG"
9+
}
10+
]

config/currentProjects.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
},
2626
{
2727
"label": "SoccerNet",
28-
"image": "soccernet.jpg",
28+
"image": "soccernet.png",
2929
"leads": [
3030
{ "name": "Antonio Capdevielle", "image": "temp.jpeg" },
3131
{ "name": "Shiva Chandran", "image": "shivac.jpg" }
@@ -85,7 +85,7 @@
8585
"leads": [
8686
{ "name": "Jason Yen", "image": "temp.jpeg" },
8787
{ "name": "Onat Ozer", "image": "temp.jpeg" },
88-
{ "name": "Adita Sinha", "image": "temp.jpeg" }
88+
{ "name": "Aditya Sinha", "image": "temp.jpeg" }
8989
]
9090
}
9191
]

config/homepage.json

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
[
2-
{
3-
"name": "Image Colorization",
4-
"image": "image_colorization.png",
5-
"link": "https://docs.google.com/document/d/19CekIh2sZGKKMoRA5VNFEcjNGHc9GEYt/"
6-
},
7-
{
8-
"name": "Webscraping",
9-
"image": "webscraping.png",
10-
"link": "https://docs.google.com/document/d/1uVD5nvpA0lg9E8tE9khuEQDlwCwHKgrHGqtvzKe2JoA/"
11-
},
12-
{
13-
"name": "Footwear Classification",
14-
"image": "footwear_classification.png",
15-
"link": "https://docs.google.com/presentation/d/1Bb7nCc4o3fmV4OkR-NOeAwzl6i1E_BA_V937Gjoq1wc/"
16-
}
17-
]
2+
{
3+
"name": "LLM Augmentation",
4+
"image": "llm_augmentation.png",
5+
"link": "https://github.com/MichiganDataScienceTeam/W24-llm-augmentation"
6+
},
7+
8+
{
9+
"name": "Image Colorization",
10+
"image": "image_colorization.png",
11+
"link": "https://docs.google.com/document/d/19CekIh2sZGKKMoRA5VNFEcjNGHc9GEYt/"
12+
},
13+
{
14+
"name": "Real Vs Fake Face",
15+
"image": "rvf.png",
16+
"link": "https://github.com/MichiganDataScienceTeam/W24-RvF/tree/main"
17+
}
18+
]

config/ourteam.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,11 @@
158158
"groupName": "Project Committee",
159159
"description": "Project advisors who help MDST operate our projects smoothly and at scale. Led by the VP of Projects.",
160160
"members": [
161+
{
162+
"name": "Aaron Williams",
163+
"title": "Project Planner",
164+
"image": "temp.jpeg"
165+
},
161166
{
162167
"name": "Anthony Chen",
163168
"title": "Project Planner",

config/pastProjects.json

Lines changed: 40 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
11
{
22
"Winter 2024": [
33
{
4-
"label": "Codenames"
4+
"label": "Codenames",
5+
"googleSlides": "https://docs.google.com/presentation/d/1EEHSw-WKN6Oes6NFfYK7iZHj91J1CgmHiiV8aO99r6I/"
56
},
67
{
7-
"label": "LLM Augmentation"
8+
"label": "LLM Augmentation",
9+
"github": "https://github.com/MichiganDataScienceTeam/W24-llm-augmentation"
810
},
911
{
1012
"label": "Poker Bot"
1113
},
1214
{
13-
"label": "Rate My Professor Sentiment Analysis"
15+
"label": "RMP Sentiment Analysis",
16+
"github": "https://github.com/MichiganDataScienceTeam/WN2024-RMP"
1417
},
1518
{
16-
"label": "Real vs Fake Faces"
19+
"label": "Real vs Fake Faces",
20+
"github": "https://github.com/MichiganDataScienceTeam/W24-RvF"
1721
},
1822
{
1923
"label": "Shazam Clone"
@@ -22,18 +26,25 @@
2226
"label": "Spotify Analysis"
2327
},
2428
{
25-
"label": "Stock Market Analysis"
29+
"label": "Stock Market Analysis",
30+
"github": "https://github.com/MichiganDataScienceTeam/W24-StockAnalysis"
2631
},
2732
{
28-
"label": "TikTok Videos"
33+
"label": "TikTok Videos",
34+
"github": "https://github.com/MichiganDataScienceTeam/W24-TikTokVideos"
35+
},
36+
{
37+
"label": "Neural Nets from Scratch",
38+
"googleSlides": "https://docs.google.com/presentation/d/1eygF8pf7d1f8UMB-v2oypFPFSCwICGlTM48-deNqibI/"
2939
}
3040
],
3141
"Fall 2023": [
3242
{
3343
"label": "Automated Poker Bot"
3444
},
3545
{
36-
"label": "College Football Success Factors"
46+
"label": "College Football Success Factors",
47+
"googleSlides": "https://docs.google.com/presentation/d/1tmIdFj_GK67cwrD3ueg2BlnUTtP9SWHVOYZPKaXCI5A/"
3748
},
3849
{
3950
"label": "Cracking Wordle"
@@ -45,16 +56,20 @@
4556
"label": "NHANES"
4657
},
4758
{
48-
"label": "Real vs Photoshopped Faces"
59+
"label": "Real vs Fake Faces",
60+
"github": "https://github.com/MichiganDataScienceTeam/W24-RvFF"
4961
},
5062
{
51-
"label": "Reinforcement Learning"
63+
"label": "Reinforcement Learning",
64+
"github": "https://github.com/MichiganDataScienceTeam/F23-Reinforcement-Learning",
65+
"googleSlides": "https://docs.google.com/presentation/d/1d4I_1fqJCD7ZppEVOkYuTzfMbQ8NKCpYjbQkIEoSwNk/"
5266
},
5367
{
5468
"label": "Sentence Completer"
5569
},
5670
{
57-
"label": "Webscraping"
71+
"label": "Webscraping",
72+
"github": "https://github.com/MichiganDataScienceTeam/F23-Webscraping"
5873
}
5974
],
6075
"Winter 2023": [
@@ -91,29 +106,36 @@
91106
],
92107
"Fall 2022": [
93108
{
94-
"label": "College Football"
109+
"label": "College Football",
110+
"googleSlides": "https://docs.google.com/document/d/1aD0UfCwea5I35nqoAEfS0PNpnzrAv3LX-X4kTCLVuu4/"
95111
},
96112
{
97-
"label": "Dogs vs Cats"
113+
"label": "Dogs vs Cats",
114+
"googleSlides": "https://docs.google.com/presentation/d/1p-nNSJNfZd09ApFk05hJZfRlY2Z8PlsiVTgp0i6_U44/"
98115
},
99116
{
100-
"label": "Image Super Resolution"
117+
"label": "Image Super Resolution",
118+
"googleSlides": "https://drive.google.com/file/d/1cKrjVCl-M5wXzARgPMj8Gr-foZpEkIS_/"
101119
},
102120
{
103121
"label": "Language Translation Application"
104122
},
105123
{
106-
"label": "Pokemon Data Science"
124+
"label": "Pokemon Data Science",
125+
"github": "https://docs.google.com/presentation/d/1vgOGh7djJRqNI7Ihf-R4ZZh7ON_KlCtCsHYucy0Aujk/"
107126
},
108127
{
109-
"label": "SEC Insider Information",
110-
"github": "https://github.com/MichiganDataScienceTeam/F22-SEC-Insider-Trading"
128+
"label": "SEC Insider Trading",
129+
"github": "https://github.com/MichiganDataScienceTeam/F22-SEC-Insider-Trading",
130+
"googleSlides": "https://docs.google.com/presentation/d/1dfPMDMX9n3X6GxDN9UDY6cfULwg4e-BLKfpSPziidKY/"
111131
},
112132
{
113-
"label": "Sports Data Science"
133+
"label": "Sports Data Science",
134+
"googleSlides": "https://docs.google.com/presentation/d/1q_kJey90QQsP4Nm5b96o5NVMg4gRgbTqe9THJfaXle0/"
114135
},
115136
{
116-
"label": "TLDR Machine"
137+
"label": "TLDR Machine",
138+
"googleSlides": "https://docs.google.com/presentation/d/1dmCTwBANTU1W1ik5dSXuwD5ycRRRCtjyiQzMFE2zDgs/"
117139
},
118140
{
119141
"label": "Twitter Sentiment Analysis"

config/sponsors.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
"link": "https://www.myrocketcareer.com/",
88
"image": "rocket.png"
99
},
10+
{
11+
"name": "Discover",
12+
"link": "https://www.discover.com/",
13+
"image": "discover.png"
14+
},
1015
{
1116
"name": "Wolverine Trading",
1217
"link": "https://www.wolve.com/",

pages/projects/[...slug].jsx

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@ import Hero from "@/components/hero";
77
import Image from "next/image";
88
import HeadContent from "@/components/headContent";
99

10+
// Function to get all projects from JSON files
11+
const getAllProjects = () => {
12+
try {
13+
const pastProjects = JSON.parse(fs.readFileSync(path.join(process.cwd(), 'config', 'pastProjects.json'), 'utf-8'));
14+
const currentProjects = JSON.parse(fs.readFileSync(path.join(process.cwd(), 'config', 'currentProjects.json'), 'utf-8'));
15+
return [...pastProjects, ...currentProjects];
16+
} catch (error) {
17+
console.error("Error reading or parsing JSON files:", error);
18+
return [];
19+
}
20+
};
21+
1022
function ProjectPage({ content, title, images }) {
1123
const router = useRouter();
1224
const basePath = router.basePath;
@@ -29,12 +41,19 @@ function ProjectPage({ content, title, images }) {
2941
}
3042

3143
export async function getStaticProps({ params }) {
44+
const allProjects = getAllProjects();
3245
const [subdirectory, innerDir] = params.slug;
33-
const filePath = path.join(process.cwd(), 'public', 'projects', subdirectory, innerDir, 'writeup.md');
46+
const project = allProjects.find(proj => proj.subdirectory === subdirectory && proj.innerDir === innerDir);
47+
48+
if (!project) {
49+
return { notFound: true };
50+
}
51+
52+
const filePath = path.join(process.cwd(), 'content', 'projects', subdirectory, innerDir, 'writeup.md');
3453
const fileContent = fs.readFileSync(filePath, 'utf-8');
3554

36-
const imagesDir = path.join(process.cwd(), 'public', 'projects', subdirectory, innerDir, 'images');
37-
const images = fs.existsSync(imagesDir) ? fs.readdirSync(imagesDir).map(img => path.join('/projects', subdirectory, innerDir, 'images', img)) : [];
55+
const imagesDir = path.join(process.cwd(), 'public', 'images', 'projects', subdirectory, innerDir);
56+
const images = fs.existsSync(imagesDir) ? fs.readdirSync(imagesDir).map(img => path.join('/images/projects', subdirectory, innerDir, img)) : [];
3857

3958
return {
4059
props: {
@@ -46,13 +65,13 @@ export async function getStaticProps({ params }) {
4665
}
4766

4867
export async function getStaticPaths() {
49-
const projectsDirectory = path.join(process.cwd(), "public", "projects");
50-
const subdirectories = fs.readdirSync(projectsDirectory, { withFileTypes: true }).filter(dirent => dirent.isDirectory());
68+
const allProjects = getAllProjects();
5169

52-
const paths = subdirectories.flatMap(subdirectory => {
53-
const innerDirectories = fs.readdirSync(path.join(projectsDirectory, subdirectory.name), { withFileTypes: true }).filter(dirent => dirent.isDirectory());
54-
return innerDirectories.map(innerDir => ({ params: { slug: [subdirectory.name, innerDir.name] } }));
55-
});
70+
const paths = allProjects.map(project => ({
71+
params: {
72+
slug: [project.subdirectory, project.innerDir],
73+
},
74+
}));
5675

5776
return {
5877
paths,

0 commit comments

Comments
 (0)