|
230 | 230 | cursor: pointer; |
231 | 231 | } |
232 | 232 |
|
| 233 | + /* Video play overlay container */ |
| 234 | + .video-container { |
| 235 | + position: relative; |
| 236 | + display: inline-block; |
| 237 | + width: 100%; |
| 238 | + } |
| 239 | + |
| 240 | + /* Video play overlay button */ |
| 241 | + .video-play-overlay { |
| 242 | + position: absolute; |
| 243 | + top: 0; |
| 244 | + left: 0; |
| 245 | + width: 100%; |
| 246 | + height: 100%; |
| 247 | + display: flex; |
| 248 | + align-items: center; |
| 249 | + justify-content: center; |
| 250 | + background: rgba(0, 0, 0, 0.35); |
| 251 | + border-radius: 10px; |
| 252 | + cursor: pointer; |
| 253 | + transition: background 0.3s ease; |
| 254 | + z-index: 10; |
| 255 | + } |
| 256 | + |
| 257 | + .video-play-overlay:hover { |
| 258 | + background: rgba(0, 0, 0, 0.5); |
| 259 | + } |
| 260 | + |
| 261 | + .video-play-overlay:focus { |
| 262 | + outline: 3px solid #FF6B6B; |
| 263 | + outline-offset: 2px; |
| 264 | + } |
| 265 | + |
| 266 | + /* Play icon: circle with triangle */ |
| 267 | + .play-icon { |
| 268 | + width: 72px; |
| 269 | + height: 72px; |
| 270 | + background: rgba(255, 255, 255, 0.9); |
| 271 | + border-radius: 50%; |
| 272 | + display: flex; |
| 273 | + align-items: center; |
| 274 | + justify-content: center; |
| 275 | + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); |
| 276 | + transition: transform 0.2s ease, box-shadow 0.2s ease; |
| 277 | + } |
| 278 | + |
| 279 | + .video-play-overlay:hover .play-icon { |
| 280 | + transform: scale(1.1); |
| 281 | + box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4); |
| 282 | + } |
| 283 | + |
| 284 | + /* CSS triangle for play symbol */ |
| 285 | + .play-icon::after { |
| 286 | + content: ""; |
| 287 | + display: block; |
| 288 | + width: 0; |
| 289 | + height: 0; |
| 290 | + border-style: solid; |
| 291 | + border-width: 14px 0 14px 24px; |
| 292 | + border-color: transparent transparent transparent #0A4D68; |
| 293 | + margin-left: 6px; /* Optical centering */ |
| 294 | + } |
| 295 | + |
| 296 | + /* Hide overlay when video is playing */ |
| 297 | + .video-play-overlay.hidden { |
| 298 | + display: none; |
| 299 | + } |
| 300 | + |
233 | 301 | /* GitHub Link */ |
234 | 302 | .github-link { |
235 | 303 | text-align: center; |
@@ -419,7 +487,16 @@ <h2>Screenshots</h2> |
419 | 487 | <img src="screenshots/light/0.0.6/mpos_camera_qr_320x240.png" alt="Camera QR Code Screenshot"/> |
420 | 488 | <img src="screenshots/light/0.0.6/osupdate_progress3.png" alt="OS Update Progress Screenshot"/> |
421 | 489 | <img src="screenshots/dark/0.0.4/0.0.4_launcher1.png" alt="Dark Theme Launcher Screenshot"/> |
422 | | - <video autoplay loop muted playsinline poster="screenshots/light/0.3.2/com.quasikili.quasibird_0.0.3.png" width="320" height="240" preload="auto" loading="lazy"><source src="videos/QuasiBird_0.0.3.mp4" type="video/mp4"><img src="screenshots/light/0.3.2/com.quasikili.quasibird_0.0.3.png" alt="QuasiBird game in action"></video> |
| 490 | + <!-- Video play overlay: wraps video with clickable play button --> |
| 491 | + <div class="video-container"> |
| 492 | + <video id="quasibird-video" playsinline poster="screenshots/light/0.3.2/com.quasikili.quasibird_0.0.3.png" width="320" height="240" preload="auto"> |
| 493 | + <source src="videos/QuasiBird_0.0.3.mp4" type="video/mp4"> |
| 494 | + <img src="screenshots/light/0.3.2/com.quasikili.quasibird_0.0.3.png" alt="QuasiBird game in action"> |
| 495 | + </video> |
| 496 | + <div class="video-play-overlay" id="quasibird-play-overlay" tabindex="0" role="button" aria-label="Play video"> |
| 497 | + <div class="play-icon"></div> |
| 498 | + </div> |
| 499 | + </div> |
423 | 500 | <img src="screenshots/dark/0.3.3/wifi_password.png" alt="Dark Theme WiFi Password Screenshot"/> |
424 | 501 | <img src="screenshots/dark/0.0.4/0.0.4_appstore_uninstall_draw.png" alt="Dark Theme App Store Uninstall Screenshot"/> |
425 | 502 | <img src="screenshots/dark/0.0.4/0.0.4_imu1.png" alt="Dark Theme IMU Screenshot"/> |
@@ -495,5 +572,31 @@ <h2>Possibilities</h2> |
495 | 572 | navLinks.classList.toggle('active'); |
496 | 573 | } |
497 | 574 | </script> |
| 575 | + |
| 576 | + <!-- JavaScript for Video Play Overlay --> |
| 577 | + <script> |
| 578 | + (function() { |
| 579 | + const overlay = document.getElementById('quasibird-play-overlay'); |
| 580 | + const video = document.getElementById('quasibird-video'); |
| 581 | + |
| 582 | + if (overlay && video) { |
| 583 | + function playVideo() { |
| 584 | + video.play(); |
| 585 | + overlay.classList.add('hidden'); |
| 586 | + } |
| 587 | + |
| 588 | + // Click handler |
| 589 | + overlay.addEventListener('click', playVideo); |
| 590 | + |
| 591 | + // Keyboard handler (Enter or Space) |
| 592 | + overlay.addEventListener('keydown', function(e) { |
| 593 | + if (e.key === 'Enter' || e.key === ' ') { |
| 594 | + e.preventDefault(); |
| 595 | + playVideo(); |
| 596 | + } |
| 597 | + }); |
| 598 | + } |
| 599 | + })(); |
| 600 | + </script> |
498 | 601 | </body> |
499 | 602 | </html> |
0 commit comments