-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcombined.html
311 lines (278 loc) · 9.22 KB
/
combined.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Carousel with Custom Arrows</title>
<link href="https://fonts.googleapis.com/css2?family=Sublima&display=swap" rel="stylesheet">
<style>
body {
margin: 0;
font-family: Sublima, sans-serif;
background-color: #1a1a2e;
text-align: center;
}
.container--0- {
display: flex;
flex-direction: column;
align-items: center;
padding: 20px;
gap: 20px;
width: 100%;
}
.container-0-1-0 {
display: flex;
justify-content: center;
width: 100%;
background-color: #030027;
color: #ffffff;
font-size: 65px;
font-weight: 800;
padding: 10px;
text-align: center;
}
.carousel {
width: 100%;
max-width: 1200px;
margin: 0 auto;
overflow: hidden;
position: relative;
}
.carousel__slides {
display: flex;
transition: transform 0.5s ease;
}
.slide {
display: flex;
gap: 10px;
justify-content: center;
min-width: 100%;
box-sizing: border-box;
}
.card {
display: flex;
flex-direction: column;
align-items: center;
background-color: #ffffff;
border-radius: 20px;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
width: 300px;
gap: 15px;
overflow: hidden;
margin: 0 10px;
}
.card img {
width: 100%;
min-height: 300px;
object-fit: cover;
border-top-left-radius: 20px;
border-top-right-radius: 20px;
border-bottom: 4px solid black;
}
.card .card-title {
color: #6a7fc9;
font-size: 24px;
font-weight: 800;
text-align: center;
}
.card .card-text {
color: #000000;
font-size: 18px;
font-weight: 200;
text-align: center;
border-top: 1px solid #223061;
border-bottom: 1px solid #223061;
padding: 10px;
height: 100px;
overflow: hidden;
}
.button-container {
background-color: #030027;
color: #ffffff;
font-size: 18px;
font-weight: 800;
text-align: center;
padding: 10px 20px;
border-radius: 25px;
cursor: pointer;
}
.award {
background-color: #f2f3d9;
color: #c16e70;
font-size: 14px;
font-weight: 800;
text-align: center;
padding: 5px 10px;
border-radius: 20px;
width: fit-content;
}
/* Custom Arrow Buttons */
.carousel__nav {
position: absolute;
top: 90%;
transform: translateY(-50%);
background-color: transparent;
border: none;
z-index: 1;
}
.prev, .next {
display: inline-block;
border-radius: 50%;
}
.prev .left, .next .right {
display: inline-block;
width: 4em;
height: 4em;
border: 0.5em solid #ffffff;
border-radius: 50%;
}
.left:after, .right:after {
content: '';
display: inline-block;
width: 1.4em;
height: 1.4em;
border-top: 0.5em solid #ffffff;
border-right: 0.5em solid #ffffff;
position: relative;
top: 1em;
}
.left:after {
margin-left: 0.6em;
transform: rotate(-135deg);
}
.right:after {
margin-left: -0.6em;
transform: rotate(45deg);
}
/* Hover effect */
.prev:hover .left, .next:hover .right {
border: 0.5em solid #e74c3c;
}
.prev:hover .left:after, .next:hover .right:after {
border-top: 0.5em solid #e74c3c;
border-right: 0.5em solid #e74c3c;
}
.prev { left: 10px; }
.next { right: 10px; }
/* Dots Indicator */
.carousel__dots {
text-align: center;
margin-top: 15px;
}
.carousel__dots span {
display: inline-block;
width: 12px;
height: 12px;
margin: 0 5px;
background-color: #bbb;
border-radius: 50%;
cursor: pointer;
}
.carousel__dots .active { background-color: #4CAF50; }
</style>
</head>
<body>
<div class="container--0-">
<div class="container-0-1-0">2022 First Place Winners 🥇</div>
<!-- Carousel Structure -->
<div class="carousel">
<div class="carousel__slides">
<!-- Slide 1 -->
<div class="slide">
<div class="card">
<a href="https://devpost.com/software/ecogrind" target="_blank">
<img src="https://d112y698adiu2z.cloudfront.net/photos/production/software_photos/002/455/048/datas/gallery.jpg" alt="EcoGrind">
</a>
<div class="card-title">EcoGrind</div>
<div class="card-text">Reduce food waste and create compost with EcoGrind - the modular sink grinder with a unique filtration system.</div>
<div class="button-container">View Project</div>
<div class="award">1st place</div>
</div>
<div class="card">
<a href="https://devpost.com/software/scrutch-e438pt" target="_blank">
<img src="https://d112y698adiu2z.cloudfront.net/photos/production/software_photos/002/456/419/datas/gallery.jpg" alt="Scrutch">
</a>
<div class="card-title">Scrutch</div>
<div class="card-text">We explore the discomfort in using crutches, scooters, and other mobility aid devices and aim to develop a device to address all discomfort, combining their strengths.</div>
<div class="button-container">View Project</div>
<div class="award">1st place</div>
</div>
<div class="card">
<a href="https://devpost.com/software/weldaid" target="_blank">
<img src="https://d112y698adiu2z.cloudfront.net/photos/production/software_photos/002/455/580/datas/gallery.jpg" alt="Weld Aid">
</a>
<div class="card-title">WeldAid</div>
<div class="card-text">Introducing WeldAid, an adjustable wrist rest on a tall pole stand to aid welders in completing accurate welds in challenging locations and improving weld quality.</div>
<div class="button-container">View Project</div>
<div class="award">1st place</div>
</div>
</div>
<!-- Slide 2 -->
<div class="slide">
<div class="card">
<a href="https://devpost.com/software/team-we-ball" target="_blank">
<img src="https://d112y698adiu2z.cloudfront.net/photos/production/software_photos/002/456/084/datas/gallery.jpg" alt="MDX-250">
</a>
<div class="card-title">MDX-250</div>
<div class="card-text">A versatile mobility device designed to improve freedom of movement.</div>
<div class="button-container">View Project</div>
<div class="award">2nd place</div>
</div>
<div class="card">
<a href="https://devpost.com/software/stridefree" target="_blank">
<img src="https://d112y698adiu2z.cloudfront.net/photos/production/software_photos/002/456/117/datas/gallery.jpg" alt="Stride Free">
</a>
<div class="card-title">Stride Free</div>
<div class="card-text">An innovation aimed at providing support for those needing balance assistance.</div>
<div class="button-container">View Project</div>
<div class="award">2nd place</div>
</div>
<div class="card">
<a href="https://devpost.com/software/samaritan-aerospace" target="_blank">
<img src="https://d112y698adiu2z.cloudfront.net/photos/production/software_photos/002/456/195/datas/gallery.jpg" alt="Samaritan Aerospace">
</a>
<div class="card-title">Samaritan Aerospace</div>
<div class="card-text">A cutting-edge project supporting accessible aerospace technology.</div>
<div class="button-container">View Project</div>
<div class="award">2nd place</div>
</div>
</div>
</div>
<button class="carousel__nav prev"><span class="left"></span></button>
<button class="carousel__nav next"><span class="right"></span></button>
</div>
<div class="carousel__dots">
<span class="active"></span>
<span></span>
</div>
</div>
<script>
const slidesContainer = document.querySelector('.carousel__slides');
const slides = document.querySelectorAll('.slide');
const dots = document.querySelectorAll('.carousel__dots span');
const prevButton = document.querySelector('.prev');
const nextButton = document.querySelector('.next');
let currentIndex = 0;
const totalSlides = slides.length;
function updateCarousel() {
slidesContainer.style.transform = `translateX(-${currentIndex * 100}%)`;
dots.forEach(dot => dot.classList.remove('active'));
dots[currentIndex].classList.add('active');
}
nextButton.addEventListener('click', () => {
currentIndex = (currentIndex + 1) % totalSlides;
updateCarousel();
});
prevButton.addEventListener('click', () => {
currentIndex = (currentIndex - 1 + totalSlides) % totalSlides;
updateCarousel();
});
dots.forEach((dot, index) => {
dot.addEventListener('click', () => {
currentIndex = index;
updateCarousel();
});
});
</script>
</body>
</html>