Spaces:
Running
Running
Update index.html
Browse files280 unmodified lines2812822832842852862872882892902912892922932942951 unmodified line29729829930030130230330429930030530630730830931030531130731231330931431531631711 unmodified lines32933033132732833233333433548 unmodified lines384385386387388389390391392393394395396397398399400401402403404405406407408409410411412280 unmodified lines </div> </section>
<style> /* --- GESTIONE IFRAME GAME --- */ .game-zoom-container { width: 100%; height: 100%; overflow: hidden; /* BLOCCO TOTALE DEI GESTI SUL CONTENITORE */ /* Blocca zoom e gesti touch sul contenitore */ touch-action: none; -ms-touch-action: none; user-select: none;1 unmodified line } .game-zoom-frame { border: none; /* DEFAULT (PC/Tablet orizzontale): */ /* Riempie semplicemente il box 11:9 che abbiamo impostato nell'HTML */ width: 100%; height: 100%; border: none; /* BLOCCO GESTI SULL'IFRAME */ touch-action: none; }
/* --- SOLO MOBILE VERTICALE (Smartphone) --- */ /* Qui manteniamo il tuo zoom out perché gli schermi sono stretti */ @media (max-width: 768px) { /* MODIFICA ZOOM: Rimpicciolito ancora del 20% circa */ .game-zoom-frame { width: 182%; /* Più è alto questo numero, più "mondo" vedi */ width: 182%; /* Allarga la vista */ height: 182%; transform: scale(0.55); /* Più è basso questo, più "lontano" vedi */ transform: scale(0.55); /* Rimpicciolisce tutto per farlo stare nel box */ transform-origin: top left; } }11 unmodified lines </p> </div>
<div id="game-monitor" class="relative w-full aspect-[3/4] md:aspect-[14/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"> <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"> <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"> <div class="flex items-center gap-2"> <div class="w-2 h-2 rounded-full bg-[#00ff41] animate-pulse"></div>48 unmodified lines iframe.contentWindow.focus(); } // --- FIX DOPPIO TAP ZOOM --- document.addEventListener('DOMContentLoaded', () => { const gameContainer = document.querySelector('.game-zoom-container'); let lastTouchEnd = 0;
if (gameContainer) { // 1. Previeni doppio tap veloce (zoom) gameContainer.addEventListener('touchend', function (event) { const now = (new Date()).getTime(); if (now - lastTouchEnd <= 300) { event.preventDefault(); } lastTouchEnd = now; }, false);
// 2. Previeni pinch-to-zoom manuale gameContainer.addEventListener('touchmove', function (event) { if (event.scale && event.scale !== 1) { event.preventDefault(); } }, { passive: false }); } }); </script>
<!-- UNLOCK AR LAYER -->index.html+35-8