vers. 2.1.4

This commit is contained in:
2026-01-30 00:08:08 +01:00
parent ff9c5896f0
commit 91ebc5c883
3 changed files with 62 additions and 7 deletions

View File

@@ -32,6 +32,7 @@ header('Referrer-Policy: strict-origin-when-cross-origin');
<meta name="screen-orientation" content="portrait">
<meta name="x5-orientation" content="portrait">
<meta name="x5-fullscreen" content="true">
<meta name="apple-mobile-web-app-orientations" content="portrait">
<meta name="browsermode" content="application">
<link rel="manifest" href="<?=$base_path?>/manifest.json?v=<?=$version_app?>">
<link rel="stylesheet" href="<?=$base_path?>/css/bootstrap.css">
@@ -43,6 +44,27 @@ header('Referrer-Policy: strict-origin-when-cross-origin');
<script>
// Passa il percorso base a JavaScript
var BASE_PATH = "<?=$base_path?>";
// Forza l'orientamento portrait
if (window.screen && window.screen.orientation) {
// Tenta di bloccare l'orientamento in portrait
window.addEventListener('load', function() {
if (screen.orientation && screen.orientation.lock) {
screen.orientation.lock('portrait').catch(function(error) {
console.log('Orientation lock not supported or failed:', error);
});
}
});
}
// Fallback per dispositivi che non supportano l'API
// Mostra un avviso se l'utente ruota il dispositivo
window.addEventListener('orientationchange', function() {
if (window.orientation !== 0 && window.orientation !== 180) {
// Il dispositivo è in landscape, ma non possiamo forzarlo
console.log('Si prega di tenere il dispositivo in posizione verticale');
}
});
</script>
</head>
<body class="<?php echo $show_app ? 'appBody' : 'desktopBody'; ?>">