Spaces:
Running
Running
Update index.html
Browse files- index.html +132 -11
index.html
CHANGED
@@ -199,6 +199,90 @@
|
|
199 |
background: linear-gradient(135deg, rgba(0,0,0,0.6) 0%, rgba(15,15,40,0.8) 100%);
|
200 |
z-index: -2;
|
201 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
202 |
</style>
|
203 |
</head>
|
204 |
<body>
|
@@ -235,22 +319,59 @@
|
|
235 |
{ src: 'videos/Insta-VID1 (8).mp4', tag: ['After Effects'] },
|
236 |
];
|
237 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
238 |
return (
|
239 |
<>
|
240 |
<header>
|
241 |
<h1>Calvin Allen-Crawford's Gen AI Gallery</h1>
|
242 |
</header>
|
243 |
-
<main>
|
244 |
-
<div className="
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
254 |
</div>
|
255 |
</main>
|
256 |
</>
|
|
|
199 |
background: linear-gradient(135deg, rgba(0,0,0,0.6) 0%, rgba(15,15,40,0.8) 100%);
|
200 |
z-index: -2;
|
201 |
}
|
202 |
+
|
203 |
+
.gallery-container {
|
204 |
+
position: relative;
|
205 |
+
display: flex;
|
206 |
+
justify-content: center;
|
207 |
+
align-items: center;
|
208 |
+
min-height: calc(100vh - 100px);
|
209 |
+
height: auto;
|
210 |
+
padding: 20px;
|
211 |
+
}
|
212 |
+
|
213 |
+
.video-showcase {
|
214 |
+
position: relative;
|
215 |
+
width: auto;
|
216 |
+
max-width: 95%;
|
217 |
+
background-color: var(--card-background);
|
218 |
+
border-radius: 15px;
|
219 |
+
box-shadow: 0 20px 50px rgba(0,0,0,0.7);
|
220 |
+
overflow: hidden;
|
221 |
+
perspective: 1000px;
|
222 |
+
transform: rotateX(10deg);
|
223 |
+
transition: all 0.3s ease;
|
224 |
+
display: flex;
|
225 |
+
flex-direction: column;
|
226 |
+
}
|
227 |
+
|
228 |
+
.video-showcase:hover {
|
229 |
+
transform: scale(1.02) rotateX(0);
|
230 |
+
box-shadow: 0 20px 45px rgba(0,255,255,0.3);
|
231 |
+
}
|
232 |
+
|
233 |
+
.video-showcase video {
|
234 |
+
width: 100%;
|
235 |
+
height: auto;
|
236 |
+
object-fit: contain;
|
237 |
+
transition: transform 0.3s ease;
|
238 |
+
align-self: center;
|
239 |
+
}
|
240 |
+
|
241 |
+
.navigation-arrow {
|
242 |
+
position: absolute;
|
243 |
+
top: 50%;
|
244 |
+
transform: translateY(-50%);
|
245 |
+
background: rgba(0,255,255,0.2);
|
246 |
+
color: var(--primary-color);
|
247 |
+
border: 2px solid var(--primary-color);
|
248 |
+
width: 70px;
|
249 |
+
height: 70px;
|
250 |
+
display: flex;
|
251 |
+
justify-content: center;
|
252 |
+
align-items: center;
|
253 |
+
cursor: pointer;
|
254 |
+
z-index: 10;
|
255 |
+
transition: all 0.3s ease;
|
256 |
+
font-size: 36px;
|
257 |
+
font-weight: bold;
|
258 |
+
opacity: 0.7;
|
259 |
+
}
|
260 |
+
|
261 |
+
.navigation-arrow:hover {
|
262 |
+
background: rgba(0,255,255,0.4);
|
263 |
+
box-shadow: 0 0 15px rgba(0,255,255,0.5);
|
264 |
+
opacity: 1;
|
265 |
+
}
|
266 |
+
|
267 |
+
.navigation-arrow.prev {
|
268 |
+
left: 30px;
|
269 |
+
}
|
270 |
+
|
271 |
+
.navigation-arrow.next {
|
272 |
+
right: 30px;
|
273 |
+
}
|
274 |
+
|
275 |
+
.video-tags {
|
276 |
+
position: absolute;
|
277 |
+
bottom: 0;
|
278 |
+
left: 0;
|
279 |
+
width: 100%;
|
280 |
+
padding: 15px;
|
281 |
+
background: rgba(0,0,0,0.7);
|
282 |
+
color: var(--primary-color);
|
283 |
+
text-align: center;
|
284 |
+
font-family: 'Orbitron', sans-serif;
|
285 |
+
}
|
286 |
</style>
|
287 |
</head>
|
288 |
<body>
|
|
|
319 |
{ src: 'videos/Insta-VID1 (8).mp4', tag: ['After Effects'] },
|
320 |
];
|
321 |
|
322 |
+
const [currentVideoIndex, setCurrentVideoIndex] = useState(0);
|
323 |
+
const [videoDimensions, setVideoDimensions] = useState({ width: 'auto', height: 'auto' });
|
324 |
+
|
325 |
+
const handleLoadedMetadata = (e) => {
|
326 |
+
const { videoWidth, videoHeight } = e.target;
|
327 |
+
setVideoDimensions({ width: videoWidth, height: videoHeight });
|
328 |
+
};
|
329 |
+
|
330 |
+
const handleNextVideo = () => {
|
331 |
+
setCurrentVideoIndex((prevIndex) =>
|
332 |
+
prevIndex === videos.length - 1 ? 0 : prevIndex + 1
|
333 |
+
);
|
334 |
+
};
|
335 |
+
|
336 |
+
const handlePrevVideo = () => {
|
337 |
+
setCurrentVideoIndex((prevIndex) =>
|
338 |
+
prevIndex === 0 ? videos.length - 1 : prevIndex - 1
|
339 |
+
);
|
340 |
+
};
|
341 |
+
|
342 |
+
const currentVideo = videos[currentVideoIndex];
|
343 |
+
|
344 |
return (
|
345 |
<>
|
346 |
<header>
|
347 |
<h1>Calvin Allen-Crawford's Gen AI Gallery</h1>
|
348 |
</header>
|
349 |
+
<main className="gallery-container">
|
350 |
+
<div className="navigation-arrow prev" onClick={handlePrevVideo}>
|
351 |
+
❮
|
352 |
+
</div>
|
353 |
+
<div className="video-showcase">
|
354 |
+
<video
|
355 |
+
key={currentVideo.src}
|
356 |
+
controls
|
357 |
+
autoPlay
|
358 |
+
src={currentVideo.src}
|
359 |
+
onLoadedMetadata={handleLoadedMetadata}
|
360 |
+
style={{
|
361 |
+
maxWidth: '95vw',
|
362 |
+
maxHeight: '80vh',
|
363 |
+
width: videoDimensions.width,
|
364 |
+
height: videoDimensions.height
|
365 |
+
}}
|
366 |
+
>
|
367 |
+
Your browser does not support the video tag.
|
368 |
+
</video>
|
369 |
+
<div className="video-tags">
|
370 |
+
{currentVideo.tag.join(', ')}
|
371 |
+
</div>
|
372 |
+
</div>
|
373 |
+
<div className="navigation-arrow next" onClick={handleNextVideo}>
|
374 |
+
❯
|
375 |
</div>
|
376 |
</main>
|
377 |
</>
|