|
236 | 236 | } |
237 | 237 | footer a { color: var(--primary); } |
238 | 238 |
|
| 239 | + /* ── Lightbox ──────────────────────────────────────────────── */ |
| 240 | + .game-gif { cursor: zoom-in; } |
| 241 | + .lightbox { |
| 242 | + display: none; |
| 243 | + position: fixed; inset: 0; z-index: 999; |
| 244 | + background: rgba(5,11,31,.85); |
| 245 | + align-items: center; justify-content: center; |
| 246 | + padding: 1.5rem; |
| 247 | + } |
| 248 | + .lightbox.open { display: flex; } |
| 249 | + .lightbox img { |
| 250 | + max-width: 90vw; max-height: 90vh; |
| 251 | + border-radius: var(--radius); |
| 252 | + box-shadow: 0 24px 60px rgba(5,11,31,.5); |
| 253 | + cursor: zoom-out; |
| 254 | + } |
| 255 | + .lightbox-close { |
| 256 | + position: fixed; top: 1rem; right: 1.25rem; |
| 257 | + background: var(--surface); border: 1px solid var(--border); |
| 258 | + border-radius: 999px; width: 36px; height: 36px; |
| 259 | + display: flex; align-items: center; justify-content: center; |
| 260 | + cursor: pointer; font-size: 1.1rem; color: var(--text); |
| 261 | + box-shadow: var(--shadow); |
| 262 | + } |
| 263 | + .lightbox-close:hover { background: var(--surface2); } |
| 264 | + |
239 | 265 | /* ── Responsive ────────────────────────────────────────────── */ |
240 | 266 | @media (max-width: 680px) { |
241 | 267 | .game-block, .game-block.reverse { grid-template-columns: 1fr; direction: ltr; } |
|
255 | 281 | <a href="#faq">FAQ</a> |
256 | 282 | </div> |
257 | 283 | <!-- Replace # with your live URL when deployed --> |
258 | | - <a class="btn-nav" href="#">Play now</a> |
| 284 | + <a class="btn-nav" href="https://pruebas-1066426825741.europe-west1.run.app">Play now</a> |
259 | 285 | </div> |
260 | 286 | </nav> |
261 | 287 |
|
|
266 | 292 | <h1>Board games, online,<br>with your friends</h1> |
267 | 293 | <p>TableRoom lets you play Última Carta, Connect 4, and Checkers in real time — from any browser, no install needed.</p> |
268 | 294 | <div class="hero-actions"> |
269 | | - <a class="btn-primary" href="#">Play now</a> |
| 295 | + <a class="btn-primary" href="https://pruebas-1066426825741.europe-west1.run.app">Play now</a> |
270 | 296 | <a class="btn-outline" href="https://github.com/MariaPicazoSanchez/TableRoom">View on GitHub</a> |
271 | 297 | </div> |
272 | 298 | </div> |
@@ -455,5 +481,30 @@ <h2 class="section-title">FAQ</h2> |
455 | 481 | </div> |
456 | 482 | </footer> |
457 | 483 |
|
| 484 | + <!-- LIGHTBOX --> |
| 485 | + <div class="lightbox" id="lightbox"> |
| 486 | + <span class="lightbox-close" id="lightbox-close">✕</span> |
| 487 | + <img id="lightbox-img" src="" alt=""> |
| 488 | + </div> |
| 489 | + |
| 490 | + <script> |
| 491 | + const lightbox = document.getElementById('lightbox'); |
| 492 | + const lightboxImg = document.getElementById('lightbox-img'); |
| 493 | + const lightboxClose = document.getElementById('lightbox-close'); |
| 494 | + |
| 495 | + document.querySelectorAll('.game-gif').forEach(img => { |
| 496 | + img.addEventListener('click', () => { |
| 497 | + lightboxImg.src = img.src; |
| 498 | + lightboxImg.alt = img.alt; |
| 499 | + lightbox.classList.add('open'); |
| 500 | + }); |
| 501 | + }); |
| 502 | + |
| 503 | + function closeLightbox() { lightbox.classList.remove('open'); } |
| 504 | + lightboxClose.addEventListener('click', closeLightbox); |
| 505 | + lightbox.addEventListener('click', e => { if (e.target === lightbox || e.target === lightboxImg) closeLightbox(); }); |
| 506 | + document.addEventListener('keydown', e => { if (e.key === 'Escape') closeLightbox(); }); |
| 507 | + </script> |
| 508 | + |
458 | 509 | </body> |
459 | 510 | </html> |
0 commit comments