Skip to content

Commit 16b735f

Browse files
authored
Merge pull request #96 from MichiganDataScienceTeam/redesign-community-image
Redesign community image
2 parents 9ca6cfe + 458f22a commit 16b735f

File tree

4 files changed

+54
-16
lines changed

4 files changed

+54
-16
lines changed

components/communityImages.jsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import Image from "next/image";
21
import { useState } from "react";
32

43
export default function CommunityImages({ images, basePath }) {
@@ -15,18 +14,21 @@ export default function CommunityImages({ images, basePath }) {
1514
};
1615

1716
return (
18-
<div className="items-center mx-auto max-w-6xl">
19-
<div className="relative">
17+
<div className="items-center mx-auto">
18+
<div className="relative community-image-container">
2019
<button
2120
onClick={prevImage}
22-
className="absolute left-0 top-1/2 transform -translate-y-1/2 bg-gray-500 text-white p-2 rounded"
21+
className="absolute left-12 top-1/2 transform -translate-y-1/2 bg-gray-500 text-white p-2 rounded"
2322
>
2423
2524
</button>
25+
<h1 className="community-image-headline gradient-text">
26+
{images[currentIndex].name}
27+
</h1>
2628
<div
2729
style={{
2830
margin: "auto",
29-
width: "85%",
31+
width: "70%",
3032
aspectRatio: 16 / 9,
3133
}}
3234
>
@@ -46,12 +48,11 @@ export default function CommunityImages({ images, basePath }) {
4648
</div>
4749
<button
4850
onClick={nextImage}
49-
className="absolute right-0 top-1/2 transform -translate-y-1/2 bg-gray-500 text-white p-2 rounded"
51+
className="absolute right-12 top-1/2 transform -translate-y-1/2 bg-gray-500 text-white p-2 rounded"
5052
>
5153
5254
</button>
5355
</div>
54-
<p className="text-base mt-2">{images[currentIndex].name}</p>
5556
</div>
5657
);
5758
}

config/communityImages.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
[
22
{
3-
"name": "",
3+
"name": "Winter 2024 Project Expo",
44
"image": "WN24_EXPO.JPG"
55
},
66
{
7-
"name": "",
7+
"name": "Winter 2024 Data Science Night",
88
"image": "WN24_DSN.JPG"
99
},
1010
{
11-
"name": "",
11+
"name": "Fall 2024 Mass Meeting 1",
1212
"image": "mass_meeting1.JPG"
1313
},
1414
{
15-
"name": "",
15+
"name": "Fall 2024 Mass Meeting 2",
1616
"image": "mass_meeting2.JPG"
1717
}
1818
]

pages/index.jsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ export default function Home({
141141
</Layout>
142142
);
143143
}
144+
144145
function ProjectCard({ json, basePath }) {
145146
return (
146147
<Link
@@ -228,8 +229,7 @@ function Carousel({ projects, basePath }) {
228229
}
229230
return (
230231
<div className="bg-grey">
231-
<Wave180 className="rotate-180"></Wave180>
232-
<div className="container mx-auto py-4 relative overflow-hidden">
232+
<div className="container mx-auto mt-16 mb-16 py-4 p-4 relative overflow-hidden">
233233
<h2 className="text-3xl text-center font-bold">Recent Projects</h2>
234234
<div
235235
className="flex gap-4 flex-row p-4 justify-center transition"
@@ -264,7 +264,6 @@ function Carousel({ projects, basePath }) {
264264
<Icon className="" name="arrow-right" />
265265
</button>
266266
</div>
267-
<Wave></Wave>
268267
</div>
269268
);
270269
}

styles/globals.css

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
.gradient-text {
2323
background: linear-gradient(
2424
90deg,
25-
#896ae4,
26-
#feb47b
25+
#c0abfe,
26+
#90f7df
2727
); /* Adjust the gradient colors as needed */
2828
-webkit-background-clip: text;
2929
-webkit-text-fill-color: transparent;
@@ -48,6 +48,9 @@
4848
}
4949
}
5050

51+
.project-card-home {
52+
background: linear-gradient(90deg, #c0abfe, #90f7df);
53+
}
5154
.markdown h1 {
5255
@apply text-4xl;
5356
@apply mb-4;
@@ -206,6 +209,36 @@
206209
font-weight: bold;
207210
}
208211

212+
.community-image-headline {
213+
font-size: 2rem;
214+
text-align: center;
215+
}
216+
217+
.community-image-container {
218+
background-color: rgb(21, 21, 21);
219+
margin-bottom: 7%;
220+
padding-top: 3%;
221+
padding-bottom: 10%;
222+
width: 100%;
223+
}
224+
.community-image-container::before,
225+
.community-image-container::after {
226+
content: "";
227+
position: absolute;
228+
left: 0;
229+
width: 100%;
230+
height: 3px;
231+
background: linear-gradient(to right, #896ae4, #34c5a2); /* Gradient colors */
232+
}
233+
234+
.community-image-container::before {
235+
top: 0; /* Position at the top */
236+
}
237+
238+
.community-image-container::after {
239+
bottom: 0; /* Position at the bottom */
240+
}
241+
209242
/* Hover effect */
210243
.scroll-up-button:hover {
211244
background-color: #896ae4;
@@ -220,6 +253,11 @@ html {
220253
scroll-behavior: smooth;
221254
}
222255

256+
footer {
257+
border-top: 0.5px solid;
258+
border-top-color: #cabbf6;
259+
background-color: rgb(21, 21, 21);
260+
}
223261
/* Scroll to top when button is clicked */
224262
.scroll-up-button:target {
225263
scroll-behavior: auto;

0 commit comments

Comments
 (0)