diff --git a/css/style.css b/css/style.css index da923ba..dc2addf 100644 --- a/css/style.css +++ b/css/style.css @@ -107,14 +107,7 @@ body.has-player { --dock-space: var(--player-h); } -/* iPhone, app installata, viewport più corto dello schermo (vedi js/app.js): l'area sicura in basso è già fuori - dal viewport, la tab bar non la aggiunge una seconda volta */ -html.vp-ridotto { - --safe-bottom: 0px; -} - -/* Colore delle barre dell'app (topbar, tab bar, sfondo di pagina): lo stesso, così le fasce che iOS dipinge - fuori dal viewport (barra di stato, fondo) si fondono con le barre */ +/* Colore della tab bar */ :root { --bar-bg: color-mix(in srgb, var(--brand-900) 92%, black); } @@ -140,8 +133,6 @@ html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overscroll-behavior: none; - /* Stesso colore di topbar e tab bar: le fasce che il sistema dipinge fuori dal viewport si fondono con le barre */ - background: var(--bar-bg); } body { @@ -257,11 +248,12 @@ button { /* Ancorato ai bordi dello schermo: su iOS (app installata, barra di stato trasparente) le altezze in vh/dvh possono risultare più corte dello schermo e lasciare una fascia vuota sotto la tab bar */ -/* Tutto ciò che è "fisso" (player, banner, overlay, barra di avanzamento) è figlio del guscio con position: absolute: - segue il guscio, non il viewport. */ +/* Guscio in flusso alto quanto il viewport dinamico (come nella 3.0.0). Player, banner, overlay e barra di + avanzamento sono figli del guscio con position: absolute: seguono il guscio. */ .app-shell { - position: fixed; - inset: 0; + position: relative; + height: 100vh; + height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: "top" "main" "tab"; @@ -303,9 +295,9 @@ button { position: relative; height: calc(var(--topbar-h) + var(--safe-top)); padding: var(--safe-top) var(--gutter) 0; - background: var(--bar-bg); + background: var(--brand-700); color: #fff; - border-bottom: 1px solid rgba(255, 255, 255, 0.08); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 30px color-mix(in srgb, var(--brand-900) 25%, transparent); z-index: 20; } diff --git a/data/changelog.xml b/data/changelog.xml index 71a84b2..8c5afcf 100644 --- a/data/changelog.xml +++ b/data/changelog.xml @@ -2,6 +2,15 @@ + + 3.0.4 + + Guscio dell'app, topbar e colori riportati a come erano nella 3.0.0 (che sull'iPhone si vedeva correttamente); restano le migliorie al player, ai podcast e all'aggiornamento automatico. + Pagina di diagnostica /debug.html per verificare i confini del viewport sul dispositivo. + + + + 3.0.3 diff --git a/debug.html b/debug.html new file mode 100644 index 0000000..97fe7de --- /dev/null +++ b/debug.html @@ -0,0 +1,58 @@ + + + + +RPIGroup Play - diagnostica viewport + + + + + + + +
+
+
+
+
position: fixed; bottom: 0
+
rosso = fixed inset 0 · verde = 100dvh · blu = 100vh · giallo = area sicura
+
misuro…
+ + + diff --git a/js/app.js b/js/app.js index fcaba05..3461776 100644 --- a/js/app.js +++ b/js/app.js @@ -814,45 +814,8 @@ return true; } - /** - * iPhone, app installata: iOS 26 dà alla pagina un viewport più corto dello schermo (barra di stato in alto e una - * fascia di circa 60 pt in basso restano fuori e il sistema le dipinge con lo sfondo della pagina; lì non si può - * disegnare). In quel caso iOS riporta comunque un'area sicura in basso, che sarebbe doppia: la classe - * vp-ridotto su la azzera (css: --safe-bottom), così sotto le icone della tab bar resta solo la fascia - * del sistema, dello stesso colore della barra. - */ - var Schermo = { - iphone: /iPhone|iPod/.test(navigator.userAgent), - standalone: function () { - return navigator.standalone === true || (window.matchMedia && window.matchMedia('(display-mode: standalone)').matches); - }, - adatta: function () { - var root = document.documentElement; - var ridotto = false; - if (this.iphone && this.standalone()) { - var portrait = window.innerHeight >= window.innerWidth; - var screenH = portrait ? Math.max(screen.width, screen.height) : Math.min(screen.width, screen.height); - var screenW = portrait ? Math.min(screen.width, screen.height) : Math.max(screen.width, screen.height); - var differenza = screenH - window.innerHeight; - // Solo a schermo intero e per uno scarto "da barra" (tra 40 e 160 pt) - ridotto = window.innerWidth === screenW && differenza >= 40 && differenza <= 160; - } - root.classList.toggle('vp-ridotto', ridotto); - }, - init: function () { - var self = this; - var aggiorna = function () { self.adatta(); }; - aggiorna(); - window.addEventListener('resize', aggiorna); - window.addEventListener('orientationchange', function () { setTimeout(aggiorna, 300); }); - window.addEventListener('pageshow', aggiorna); - if (window.visualViewport) window.visualViewport.addEventListener('resize', aggiorna); - } - }; - function init() { if (!content || gusciVecchio()) return; - Schermo.init(); Offline.init(); Player.init(); Podcast.init(); diff --git a/manifest.json b/manifest.json index 766dafd..e5e976f 100644 --- a/manifest.json +++ b/manifest.json @@ -6,8 +6,8 @@ "start_url": "./?app=true", "scope": "./", "display": "standalone", - "background_color": "#0e132b", - "theme_color": "#0e132b", + "background_color": "#1c2555", + "theme_color": "#1c2555", "orientation": "any", "lang": "it", "categories": ["music", "entertainment", "news"], diff --git a/static/head.php b/static/head.php index 15e93c9..46ad42e 100644 --- a/static/head.php +++ b/static/head.php @@ -25,7 +25,7 @@ header('Referrer-Policy: strict-origin-when-cross-origin'); - + diff --git a/sw.js b/sw.js index 563f19b..a447dd4 100644 --- a/sw.js +++ b/sw.js @@ -1,4 +1,4 @@ -const CACHE_NAME = 'rpigroupplay-v9'; +const CACHE_NAME = 'rpigroupplay-v10'; const ASSETS = [ './', './index.php',