Spaces:
Running
Running
Update index.html
Browse files- index.html +35 -8
index.html
CHANGED
|
@@ -281,12 +281,15 @@
|
|
| 281 |
</div>
|
| 282 |
</section>
|
| 283 |
|
|
|
|
|
|
|
| 284 |
<style>
|
|
|
|
| 285 |
.game-zoom-container {
|
| 286 |
width: 100%;
|
| 287 |
height: 100%;
|
| 288 |
overflow: hidden;
|
| 289 |
-
/*
|
| 290 |
touch-action: none;
|
| 291 |
-ms-touch-action: none;
|
| 292 |
user-select: none;
|
|
@@ -294,19 +297,21 @@
|
|
| 294 |
}
|
| 295 |
|
| 296 |
.game-zoom-frame {
|
|
|
|
|
|
|
|
|
|
| 297 |
width: 100%;
|
| 298 |
height: 100%;
|
| 299 |
-
border: none;
|
| 300 |
-
/* BLOCCO GESTI SULL'IFRAME */
|
| 301 |
touch-action: none;
|
| 302 |
}
|
| 303 |
|
|
|
|
|
|
|
| 304 |
@media (max-width: 768px) {
|
| 305 |
-
/* MODIFICA ZOOM: Rimpicciolito ancora del 20% circa */
|
| 306 |
.game-zoom-frame {
|
| 307 |
-
width: 182%;
|
| 308 |
height: 182%;
|
| 309 |
-
transform: scale(0.55); /*
|
| 310 |
transform-origin: top left;
|
| 311 |
}
|
| 312 |
}
|
|
@@ -324,8 +329,7 @@
|
|
| 324 |
</p>
|
| 325 |
</div>
|
| 326 |
|
| 327 |
-
<div id="game-monitor" class="relative w-full aspect-[3/4] md:aspect-[
|
| 328 |
-
|
| 329 |
<div class="absolute top-0 left-0 w-full h-8 bg-[#0a0a0a] border-b border-[#00ff41]/50 flex items-center justify-between px-4 z-20 select-none pointer-events-none">
|
| 330 |
<div class="flex items-center gap-2">
|
| 331 |
<div class="w-2 h-2 rounded-full bg-[#00ff41] animate-pulse"></div>
|
|
@@ -380,6 +384,29 @@
|
|
| 380 |
|
| 381 |
iframe.contentWindow.focus();
|
| 382 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 383 |
</script>
|
| 384 |
|
| 385 |
<!-- UNLOCK AR LAYER -->
|
|
|
|
| 281 |
</div>
|
| 282 |
</section>
|
| 283 |
|
| 284 |
+
|
| 285 |
+
|
| 286 |
<style>
|
| 287 |
+
/* --- GESTIONE IFRAME GAME --- */
|
| 288 |
.game-zoom-container {
|
| 289 |
width: 100%;
|
| 290 |
height: 100%;
|
| 291 |
overflow: hidden;
|
| 292 |
+
/* Blocca zoom e gesti touch sul contenitore */
|
| 293 |
touch-action: none;
|
| 294 |
-ms-touch-action: none;
|
| 295 |
user-select: none;
|
|
|
|
| 297 |
}
|
| 298 |
|
| 299 |
.game-zoom-frame {
|
| 300 |
+
border: none;
|
| 301 |
+
/* DEFAULT (PC/Tablet orizzontale): */
|
| 302 |
+
/* Riempie semplicemente il box 11:9 che abbiamo impostato nell'HTML */
|
| 303 |
width: 100%;
|
| 304 |
height: 100%;
|
|
|
|
|
|
|
| 305 |
touch-action: none;
|
| 306 |
}
|
| 307 |
|
| 308 |
+
/* --- SOLO MOBILE VERTICALE (Smartphone) --- */
|
| 309 |
+
/* Qui manteniamo il tuo zoom out perché gli schermi sono stretti */
|
| 310 |
@media (max-width: 768px) {
|
|
|
|
| 311 |
.game-zoom-frame {
|
| 312 |
+
width: 182%; /* Allarga la vista */
|
| 313 |
height: 182%;
|
| 314 |
+
transform: scale(0.55); /* Rimpicciolisce tutto per farlo stare nel box */
|
| 315 |
transform-origin: top left;
|
| 316 |
}
|
| 317 |
}
|
|
|
|
| 329 |
</p>
|
| 330 |
</div>
|
| 331 |
|
| 332 |
+
<div id="game-monitor" class="relative w-full aspect-[3/4] md:aspect-[11/9] rounded-xl overflow-hidden border-2 border-[#00ff41] shadow-[0_0_40px_rgba(0,255,65,0.15)] bg-black group transition-all hover:shadow-[0_0_60px_rgba(0,255,65,0.25)] mx-auto max-w-sm md:max-w-4xl">
|
|
|
|
| 333 |
<div class="absolute top-0 left-0 w-full h-8 bg-[#0a0a0a] border-b border-[#00ff41]/50 flex items-center justify-between px-4 z-20 select-none pointer-events-none">
|
| 334 |
<div class="flex items-center gap-2">
|
| 335 |
<div class="w-2 h-2 rounded-full bg-[#00ff41] animate-pulse"></div>
|
|
|
|
| 384 |
|
| 385 |
iframe.contentWindow.focus();
|
| 386 |
}
|
| 387 |
+
// --- FIX DOPPIO TAP ZOOM ---
|
| 388 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 389 |
+
const gameContainer = document.querySelector('.game-zoom-container');
|
| 390 |
+
let lastTouchEnd = 0;
|
| 391 |
+
|
| 392 |
+
if (gameContainer) {
|
| 393 |
+
// 1. Previeni doppio tap veloce (zoom)
|
| 394 |
+
gameContainer.addEventListener('touchend', function (event) {
|
| 395 |
+
const now = (new Date()).getTime();
|
| 396 |
+
if (now - lastTouchEnd <= 300) {
|
| 397 |
+
event.preventDefault();
|
| 398 |
+
}
|
| 399 |
+
lastTouchEnd = now;
|
| 400 |
+
}, false);
|
| 401 |
+
|
| 402 |
+
// 2. Previeni pinch-to-zoom manuale
|
| 403 |
+
gameContainer.addEventListener('touchmove', function (event) {
|
| 404 |
+
if (event.scale && event.scale !== 1) {
|
| 405 |
+
event.preventDefault();
|
| 406 |
+
}
|
| 407 |
+
}, { passive: false });
|
| 408 |
+
}
|
| 409 |
+
});
|
| 410 |
</script>
|
| 411 |
|
| 412 |
<!-- UNLOCK AR LAYER -->
|