vers. 2.1.4
This commit is contained in:
@@ -398,3 +398,28 @@ button#playPauseBtn{
|
||||
}
|
||||
|
||||
|
||||
/* Forza orientamento portrait - nasconde contenuto in landscape */
|
||||
@media screen and (orientation: landscape) and (max-height: 450px) {
|
||||
body.appBody::after {
|
||||
content: "Ruota il dispositivo in verticale";
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: #2a377e;
|
||||
color: white;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 1.2rem;
|
||||
font-weight: 600;
|
||||
z-index: 9999;
|
||||
text-align: center;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
body.appBody>* {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,14 @@
|
||||
|
||||
<changelog>
|
||||
|
||||
<version>
|
||||
<number>2.1.4</number>
|
||||
<logs>
|
||||
<log>Corretto la visione verticale sui dispositivi mobili</log>
|
||||
<log>Correzione e bugfix di problematiche varie.</log>
|
||||
</logs>
|
||||
</version>
|
||||
|
||||
<version>
|
||||
<number>2.1.3 (a)</number>
|
||||
<logs>
|
||||
|
||||
@@ -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'; ?>">
|
||||
Reference in New Issue
Block a user