Skip to content

Commit 48c63d3

Browse files
authored
Merge pull request #87 from MichiganDataScienceTeam/summer24
(feat) merge in additions for Compant Worked With
2 parents 789f382 + 2b0d7e6 commit 48c63d3

File tree

13 files changed

+105
-2
lines changed

13 files changed

+105
-2
lines changed

components/companyCard.jsx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import Image from "next/image";
2+
import Link from "next/link";
3+
export default function CompanyCard({ json, basePath }) {
4+
const style = "relative " + "h-28 w-28"; // larger: "h-48 w-48"
5+
return (
6+
<Link
7+
className="text-center rounded-lg bg-grey py-4 px-8 w-full sm:w-60 hover:-translate-y-1"
8+
href={json.link}
9+
>
10+
<Image
11+
className={
12+
"object-contain mx-auto " + "h-28 w-28" // larger: "glow h-48 w-48"
13+
}
14+
width="500"
15+
height="500"
16+
src={
17+
basePath
18+
? `${basePath}/images/worked-with/${json.image}`
19+
: `/images/worked-with/${json.image}`
20+
}
21+
alt={json.name}
22+
/>
23+
</Link>
24+
);
25+
}

components/companySection.jsx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import CompanyCard from "./companyCard";
2+
3+
export default function CompanySection({ group, basePath }) {
4+
return (
5+
<div className="py-8 px-4 mx-auto max-w-screen-lg text-center lg:px-6">
6+
<div
7+
className={`flex flex-wrap justify-center gap-4 lg:gap-16 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4`}
8+
>
9+
{group.companies.map((company, index) => (
10+
<CompanyCard
11+
key={index}
12+
basePath={basePath}
13+
json={company}
14+
/>
15+
))}
16+
</div>
17+
</div>
18+
);
19+
}

config/companies.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
[
2+
{
3+
"companies": [
4+
{
5+
"name": "Rocket Companies",
6+
"link": "https://www.myrocketcareer.com/",
7+
"image": "rocket-company.png"
8+
},
9+
{
10+
"name": "PwC",
11+
"link": "https://www.pwc.com/",
12+
"image": "pwc.png"
13+
},
14+
{
15+
"name": "Bloomberg",
16+
"link": "https://www.bloomberg.com/",
17+
"image": "bloomberg.png"
18+
},
19+
{
20+
"name": "Dominos",
21+
"link": "https://www.dominos.com/",
22+
"image": "dominos.png"
23+
},
24+
{
25+
"name": "Figma",
26+
"link": "https://www.figma.com/",
27+
"image": "figma.png"
28+
},
29+
{
30+
"name": "Discover",
31+
"link": "https://www.discover.com/",
32+
"image": "discover.png"
33+
},
34+
{
35+
"name": "Capital One",
36+
"link": "https://www.capitalone.com/",
37+
"image": "capital-one.png"
38+
},
39+
{
40+
"name": "Nissan",
41+
"link": "https://www.nissan-global.com/",
42+
"image": "nissan.png"
43+
},
44+
{
45+
"name": "Rockstar Games",
46+
"link": "https://www.rockstargames.com/",
47+
"image": "rockstar-games.png"
48+
}
49+
]
50+
}
51+
]

pages/index.jsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import Hero from "@/components/hero";
44
import Icon from "@/components/icon";
55
import Layout from "@/components/layout";
66
import SponsorSection from "@/components/sponsorSection";
7+
import CompanySection from "@/components/companySection";
78
import Timeline from "@/components/timeline";
89
import Wave from "@/components/wave";
910
import Wave180 from "@/components/wave180";
@@ -14,7 +15,7 @@ import Link from "next/link";
1415
import { useRouter } from "next/router";
1516
import { useState } from "react";
1617

17-
export default function Home({ sponsors, projects, timeline, communityImages }) {
18+
export default function Home({ companies, sponsors, projects, timeline, communityImages }) {
1819
sponsors[0].tier = "MDST is made possible by our sponsors";
1920
const router = useRouter();
2021
const basePath = router.basePath;
@@ -127,6 +128,12 @@ export default function Home({ sponsors, projects, timeline, communityImages })
127128
</h2>
128129
<SponsorSection basePath={basePath} group={sponsors[0]} />
129130
</div>
131+
<div className="container mx-auto px-2 mt-8">
132+
<h2 className="text-3xl text-center">
133+
Companies We Worked With:
134+
</h2>
135+
<CompanySection basePath={basePath} group={companies[0]}/>
136+
</div>
130137
</Layout>
131138
);
132139
}
@@ -218,9 +225,10 @@ function Carousel({ projects, basePath }) {
218225

219226
export async function getStaticProps() {
220227
const sponsors = loadStaticData("sponsors.json");
228+
const companies = loadStaticData("companies.json");
221229
const projects = loadStaticData("homepage.json");
222230
const timeline = loadStaticData("timeline.json");
223231
const communityImages = loadStaticData("communityImages.json");
224232

225-
return { props: { sponsors, projects, timeline, communityImages } };
233+
return { props: { companies, sponsors, projects, timeline, communityImages } };
226234
}
10.4 KB
Loading
10.3 KB
Loading
40 KB
Loading

public/images/worked-with/dominos.png

2.53 KB
Loading

public/images/worked-with/figma.png

11.7 KB
Loading

public/images/worked-with/nissan.png

51.2 KB
Loading

0 commit comments

Comments
 (0)