vers. 3.0.0 - nuova interfaccia app per mobile e desktop
Nuova UI disegnata sul tema RPIGroup Radio Theme dei siti del gruppo: guscio unico responsive (sidebar e player in basso da 900px, topbar e tab bar su telefono), player della radio persistente nel dock con now playing, HLS/MP3, volume e Media Session; pagine radio, tv, podcast (copertine e programma dal feed), player e pagine di testo rifatte; icone SVG inline al posto di Bootstrap, jQuery e Material Icons; font Bricolage Grotesque e Plus Jakarta Sans in locale; service worker v5, manifest con orientamento libero, icone PWA 192 e 384 rigenerate. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
0ee93d3b75
commit
24391c49ac
58 files changed
+4029
-15353
No files matched your search
+9
-9
@@ -5,24 +5,24 @@ header('Content-Type: text/html; charset=UTF-8');
|
|||||||
|
|
||||||
// Information App
|
// Information App
|
||||||
$title_site = "RPIGroup Play";
|
$title_site = "RPIGroup Play";
|
||||||
$description_site = "Ascolta le radio del gruppo RPIGroup";
|
$description_site = "Ascolta le radio e le web TV del gruppo RPIGroup, con i podcast da riascoltare quando vuoi";
|
||||||
$logo_site = "./img/logoapp.png";
|
$logo_site = "./img/logoapp.png";
|
||||||
|
|
||||||
include_once './config/getBasePath.inc.php';
|
include_once './config/getBasePath.inc.php';
|
||||||
include_once './config/getStation.inc.php';
|
include_once './config/getStation.inc.php';
|
||||||
include_once './config/getPage.inc.php';
|
include_once './config/getPage.inc.php';
|
||||||
|
include_once './config/ui.inc.php';
|
||||||
|
|
||||||
// Controllo se l'utente è su mobile o desktop
|
// L'app è la stessa su telefono e computer: il layout si adatta alla larghezza della finestra.
|
||||||
|
// Il parametro ?app=true resta accettato per i link già in giro (siti del gruppo, finestra popup, PWA installate).
|
||||||
$is_mobile = isMobile();
|
$is_mobile = isMobile();
|
||||||
|
|
||||||
// Se l'utente è su mobile, mostra l'app direttamente
|
// ?redirect=pagina/parametro: usato dai siti del gruppo per aprire l'app direttamente su una stazione
|
||||||
// Se è su desktop, mostra prima la pagina con il pulsante "Apri l'app"
|
if (isset($_GET['redirect']) && !empty($_GET['redirect'])) {
|
||||||
$show_app = $is_mobile || (isset($_GET['app']) && $_GET['app'] == 'true');
|
|
||||||
|
|
||||||
if ($show_app && isset($_GET['redirect']) && !empty($_GET['redirect'])) {
|
|
||||||
$redirect_parts = explode('/', $_GET['redirect']);
|
$redirect_parts = explode('/', $_GET['redirect']);
|
||||||
$page = isset($redirect_parts[0]) ? $redirect_parts[0] : 'home';
|
$page = isset($redirect_parts[0]) ? sanitizePageInput($redirect_parts[0]) : 'home';
|
||||||
$param = isset($redirect_parts[1]) ? $redirect_parts[1] : '';
|
$param = isset($redirect_parts[1]) ? sanitizePageInput($redirect_parts[1]) : '';
|
||||||
|
if ($page === '') $page = 'home';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Include AJAX module DOPO aver definito le variabili
|
// Include AJAX module DOPO aver definito le variabili
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
header('Content-Type: text/html; charset=UTF-8');
|
header('Content-Type: text/html; charset=UTF-8');
|
||||||
|
|
||||||
// Determina il percorso base dell'applicazione
|
// Determina il percorso base dell'applicazione (su Windows dirname() usa la barra rovesciata: la normalizziamo)
|
||||||
$script_name = $_SERVER['SCRIPT_NAME'];
|
$script_name = $_SERVER['SCRIPT_NAME'];
|
||||||
$script_path = dirname($script_name);
|
$script_path = str_replace(DIRECTORY_SEPARATOR, '/', dirname($script_name));
|
||||||
$base_path = rtrim($script_path, '/');
|
$base_path = rtrim($script_path, '/');
|
||||||
$base_url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$base_path";
|
$base_url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$base_path";
|
||||||
@@ -0,0 +1,157 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pezzi di interfaccia condivisi tra le pagine: icone SVG inline, intestazioni, motivo grafico, link.
|
||||||
|
* Tutto quello che riguarda l'aspetto e si ripete sta qui, così le pagine restano leggibili.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** Indirizzo di una pagina dell'app (home = radice) */
|
||||||
|
function rpi_link(string $page): string
|
||||||
|
{
|
||||||
|
global $base_path;
|
||||||
|
return $page === 'home' ? $base_path . '/' : $base_path . '/' . $page;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Sezione principale a cui appartiene una pagina (per evidenziare la voce di menu) */
|
||||||
|
function rpi_section(string $page, string $param = ''): string
|
||||||
|
{
|
||||||
|
if ($page === 'play') return 'radio';
|
||||||
|
if ($page === 'playtv') return 'tv';
|
||||||
|
if (in_array($page, ['home', 'radio', 'tv', 'podcast'], true)) return $page;
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Voci del menu principale (sidebar su desktop, tab bar su telefono) */
|
||||||
|
function rpi_nav_items(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
['page' => 'home', 'label' => 'Home', 'icon' => 'home'],
|
||||||
|
['page' => 'radio', 'label' => 'Radio', 'icon' => 'radio'],
|
||||||
|
['page' => 'tv', 'label' => 'TV', 'icon' => 'tv'],
|
||||||
|
['page' => 'podcast', 'label' => 'Podcast', 'icon' => 'mic'],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Icona SVG inline (griglia 24x24, tratto 2px, colore corrente).
|
||||||
|
* Le icone "piene" (play, pause) usano il riempimento invece del tratto.
|
||||||
|
*/
|
||||||
|
function rpi_icon(string $name, int $size = 20, string $class = ''): string
|
||||||
|
{
|
||||||
|
static $icons = [
|
||||||
|
'home' => '<path d="m3 10 9-7 9 7v10a1 1 0 0 1-1 1h-5v-7H9v7H4a1 1 0 0 1-1-1V10Z"/>',
|
||||||
|
'radio' => '<path d="M4.9 19.1C1 15.2 1 8.8 4.9 4.9"/><path d="M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5"/><circle cx="12" cy="12" r="2"/><path d="M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5"/><path d="M19.1 4.9C23 8.8 23 15.1 19.1 19"/>',
|
||||||
|
'tv' => '<rect width="20" height="15" x="2" y="7" rx="2" ry="2"/><path d="m17 2-5 5-5-5"/>',
|
||||||
|
'mic' => '<rect x="9" y="2" width="6" height="12" rx="3"/><path d="M5 10a7 7 0 0 0 14 0M12 17v5"/>',
|
||||||
|
'headphones' => '<path d="M3 18v-6a9 9 0 0 1 18 0v6"/><path d="M21 19a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3zM3 19a2 2 0 0 0 2 2h1a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H3z"/>',
|
||||||
|
'arrow-left' => '<path d="M19 12H5M11 18l-6-6 6-6"/>',
|
||||||
|
'arrow-right' => '<path d="M5 12h14M13 6l6 6-6 6"/>',
|
||||||
|
'external' => '<path d="M7 17 17 7M8 7h9v9"/>',
|
||||||
|
'volume' => '<path d="M11 5 6 9H2v6h4l5 4V5Z"/><path d="M15.5 8.5a5 5 0 0 1 0 7M19 5a10 10 0 0 1 0 14"/>',
|
||||||
|
'mute' => '<path d="M11 5 6 9H2v6h4l5 4V5Z"/><path d="m23 9-6 6M17 9l6 6"/>',
|
||||||
|
'download' => '<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><path d="m7 10 5 5 5-5M12 15V3"/>',
|
||||||
|
'close' => '<path d="M18 6 6 18M6 6l12 12"/>',
|
||||||
|
'calendar' => '<rect width="18" height="18" x="3" y="4" rx="2" ry="2"/><path d="M16 2v4M8 2v4M3 10h18"/>',
|
||||||
|
'wifi-off' => '<path d="M2 2 22 22"/><path d="M8.5 16.5a5 5 0 0 1 7 0"/><path d="M2 8.82a15 15 0 0 1 4.17-2.65"/><path d="M10.66 5c4.01-.36 8.14.9 11.34 3.76"/><path d="M16.85 11.25a10 10 0 0 1 2.22 1.68"/><path d="M5 13a10 10 0 0 1 5.24-2.76"/><path d="M12 20h.01"/>',
|
||||||
|
'refresh' => '<path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"/><path d="M8 16H3v5"/>',
|
||||||
|
'info' => '<circle cx="12" cy="12" r="10"/><path d="M12 16v-4M12 8h.01"/>',
|
||||||
|
'help' => '<circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3M12 17h.01"/>',
|
||||||
|
'copyright' => '<circle cx="12" cy="12" r="10"/><path d="M14.83 14.83a4 4 0 1 1 0-5.66"/>',
|
||||||
|
'mail' => '<rect width="20" height="16" x="2" y="4" rx="2"/><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"/>',
|
||||||
|
'share' => '<path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"/><path d="m16 6-4-4-4 4M12 2v13"/>',
|
||||||
|
'plus-square' => '<rect width="18" height="18" x="3" y="3" rx="2"/><path d="M8 12h8M12 8v8"/>',
|
||||||
|
'more-vertical' => '<circle cx="12" cy="12" r="1"/><circle cx="12" cy="5" r="1"/><circle cx="12" cy="19" r="1"/>',
|
||||||
|
'rss' => '<path d="M4 11a9 9 0 0 1 9 9"/><path d="M4 4a16 16 0 0 1 16 16"/><circle cx="5" cy="19" r="1"/>',
|
||||||
|
'message' => '<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/>',
|
||||||
|
'list' => '<path d="M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01"/>',
|
||||||
|
'shield' => '<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/>',
|
||||||
|
'file-text' => '<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4"/><path d="M10 9H8M16 13H8M16 17H8"/>',
|
||||||
|
'globe' => '<circle cx="12" cy="12" r="10"/><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20M2 12h20"/>',
|
||||||
|
'clock' => '<circle cx="12" cy="12" r="10"/><path d="M12 6v6l4 2"/>',
|
||||||
|
'sparkles' => '<path d="m12 3-1.9 5.8a2 2 0 0 1-1.3 1.3L3 12l5.8 1.9a2 2 0 0 1 1.3 1.3L12 21l1.9-5.8a2 2 0 0 1 1.3-1.3L21 12l-5.8-1.9a2 2 0 0 1-1.3-1.3Z"/>',
|
||||||
|
'maximize' => '<path d="M8 3H5a2 2 0 0 0-2 2v3M16 3h3a2 2 0 0 1 2 2v3M8 21H5a2 2 0 0 1-2-2v-3M16 21h3a2 2 0 0 0 2-2v-3"/>',
|
||||||
|
// Piene
|
||||||
|
'play' => '<path d="M7 4.5v15a1 1 0 0 0 1.5.86l12.5-7.5a1 1 0 0 0 0-1.72L8.5 3.64A1 1 0 0 0 7 4.5Z"/>',
|
||||||
|
'pause' => '<rect x="6" y="4.5" width="4" height="15" rx="1.2"/><rect x="14" y="4.5" width="4" height="15" rx="1.2"/>',
|
||||||
|
];
|
||||||
|
|
||||||
|
if (!isset($icons[$name])) return '';
|
||||||
|
$filled = in_array($name, ['play', 'pause'], true);
|
||||||
|
$paint = $filled
|
||||||
|
? 'fill="currentColor"'
|
||||||
|
: 'fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"';
|
||||||
|
$cls = trim('icon icon-' . $name . ' ' . $class);
|
||||||
|
|
||||||
|
return '<svg class="' . htmlspecialchars($cls) . '" viewBox="0 0 24 24" width="' . $size . '" height="' . $size . '" ' . $paint . ' aria-hidden="true" focusable="false">' . $icons[$name] . '</svg>';
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Figura decorativa delle sezioni scure: anelli concentrici (il "segno" di RPIGroup Play) */
|
||||||
|
function rpi_motivo(string $class = ''): string
|
||||||
|
{
|
||||||
|
$cls = trim('motivo ' . $class);
|
||||||
|
$out = '<svg class="' . htmlspecialchars($cls) . '" viewBox="0 0 800 800" fill="none" aria-hidden="true" focusable="false">';
|
||||||
|
foreach ([140, 230, 320, 395] as $r) {
|
||||||
|
$out .= '<circle cx="400" cy="400" r="' . $r . '"/>';
|
||||||
|
}
|
||||||
|
return $out . '</svg>';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Intestazione di una pagina interna: sfondo del brand, pillola "torna a", etichetta, titolo, sottotitolo.
|
||||||
|
* $o = ['title' => ..., 'eyebrow' => ..., 'subtitle' => ..., 'back' => ['page' => 'home', 'label' => 'Home'], 'class' => ...]
|
||||||
|
*/
|
||||||
|
function rpi_page_header(array $o): void
|
||||||
|
{
|
||||||
|
$title = $o['title'] ?? '';
|
||||||
|
$eyebrow = $o['eyebrow'] ?? '';
|
||||||
|
$subtitle = $o['subtitle'] ?? '';
|
||||||
|
$back = $o['back'] ?? ['page' => 'home', 'label' => 'Home'];
|
||||||
|
$class = $o['class'] ?? '';
|
||||||
|
?>
|
||||||
|
<header class="page-head <?= htmlspecialchars($class) ?>">
|
||||||
|
<span class="page-head-glow" aria-hidden="true"></span>
|
||||||
|
<?= rpi_motivo('page-head-motivo') ?>
|
||||||
|
<div class="container page-head-inner">
|
||||||
|
<?php if ($back): ?>
|
||||||
|
<a href="<?= rpi_link($back['page']) ?>" data-page="<?= htmlspecialchars($back['page']) ?>" class="back-pill">
|
||||||
|
<?= rpi_icon('arrow-left', 18) ?><?= htmlspecialchars($back['label']) ?>
|
||||||
|
</a>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if ($eyebrow): ?><span class="eyebrow"><?= htmlspecialchars($eyebrow) ?></span><?php endif; ?>
|
||||||
|
<h1><?= htmlspecialchars($title) ?></h1>
|
||||||
|
<?php if ($subtitle): ?><p class="subtitle"><?= htmlspecialchars($subtitle) ?></p><?php endif; ?>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Barra in testa alle viste a tutta altezza (player radio, TV, puntata podcast): pillola indietro + titolo */
|
||||||
|
function rpi_back_pill(string $page, string $label): string
|
||||||
|
{
|
||||||
|
return '<a href="' . rpi_link($page) . '" data-page="' . htmlspecialchars($page) . '" class="back-pill">'
|
||||||
|
. rpi_icon('arrow-left', 18) . htmlspecialchars($label) . '</a>';
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Link legali e versione: nella sidebar (desktop) e in fondo alla home (telefono) */
|
||||||
|
function rpi_legal_links(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
['page' => 'page/termini-condizioni', 'label' => 'Termini e Condizioni'],
|
||||||
|
['page' => 'page/policy-privacy', 'label' => 'Policy Privacy'],
|
||||||
|
['page' => 'page/changelog', 'label' => 'Changelog'],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Dati di una stazione radio per il player (attributo data-station) */
|
||||||
|
function rpi_station_json($station): string
|
||||||
|
{
|
||||||
|
return htmlspecialchars(json_encode([
|
||||||
|
'id' => (int)$station->id,
|
||||||
|
'name' => (string)$station->name,
|
||||||
|
'slogan' => (string)$station->slogan,
|
||||||
|
'logo' => (string)$station->logo,
|
||||||
|
'stream' => (string)$station->stream,
|
||||||
|
'streamhls' => (string)$station->streamhls,
|
||||||
|
'api' => (string)$station->apiradio,
|
||||||
|
], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), ENT_QUOTES, 'UTF-8');
|
||||||
|
}
|
||||||
@@ -1,331 +0,0 @@
|
|||||||
/* ========================================
|
|
||||||
TRANSIZIONI E ANIMAZIONI
|
|
||||||
======================================== */
|
|
||||||
|
|
||||||
|
|
||||||
/* ========================================
|
|
||||||
LOADING OVERLAY
|
|
||||||
======================================== */
|
|
||||||
|
|
||||||
/* Overlay di caricamento a schermo intero */
|
|
||||||
.loading-overlay {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
background: rgba(16, 25, 75, 0.95);
|
|
||||||
backdrop-filter: blur(8px);
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
z-index: 9999;
|
|
||||||
opacity: 0;
|
|
||||||
visibility: hidden;
|
|
||||||
transition: opacity 0.3s ease, visibility 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Quando l'overlay è attivo */
|
|
||||||
.loading-overlay.active {
|
|
||||||
opacity: 1;
|
|
||||||
visibility: visible;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Contenuto dell'overlay */
|
|
||||||
.loading-content {
|
|
||||||
text-align: center;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Spinner grande per il loading overlay */
|
|
||||||
.spinner-large {
|
|
||||||
width: 60px;
|
|
||||||
height: 60px;
|
|
||||||
border: 5px solid rgba(255, 255, 255, 0.2);
|
|
||||||
border-top-color: #f7b835;
|
|
||||||
border-radius: 50%;
|
|
||||||
animation: spin 0.8s linear infinite;
|
|
||||||
margin: 0 auto 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Testo di caricamento */
|
|
||||||
.loading-text {
|
|
||||||
font-size: 1.1rem;
|
|
||||||
font-weight: 500;
|
|
||||||
color: white;
|
|
||||||
margin: 0;
|
|
||||||
animation: pulse 1.5s ease-in-out infinite;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Animazione pulse per il testo */
|
|
||||||
@keyframes pulse {
|
|
||||||
|
|
||||||
0%,
|
|
||||||
100% {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
50% {
|
|
||||||
opacity: 0.5;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Transizione per i link di navigazione */
|
|
||||||
/* .navLink,
|
|
||||||
.nav-link,
|
|
||||||
.station-link,
|
|
||||||
.linkBox {
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Effetto hover sui link */
|
|
||||||
/* .navLink:hover,
|
|
||||||
.nav-link:hover,
|
|
||||||
.station-link:hover,
|
|
||||||
.linkBox:hover {
|
|
||||||
transform: translateY(-2px);
|
|
||||||
opacity: 0.8;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Effetto attivo sui link di navigazione del menu */
|
|
||||||
|
|
||||||
|
|
||||||
@keyframes pulseActive {
|
|
||||||
|
|
||||||
0%,
|
|
||||||
100% {
|
|
||||||
opacity: 1;
|
|
||||||
transform: translateX(-50%) scale(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
50% {
|
|
||||||
opacity: 0.6;
|
|
||||||
transform: translateX(-50%) scale(1.2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Effetto click/tap */
|
|
||||||
/* .navLink:active,
|
|
||||||
.nav-link:active,
|
|
||||||
.station-link:active,
|
|
||||||
.linkBox:active {
|
|
||||||
transform: scale(0.98);
|
|
||||||
transition: transform 0.1s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Transizione per le card delle stazioni */
|
|
||||||
/*.station-card {
|
|
||||||
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.station-card:hover {
|
|
||||||
transform: translateY(-5px);
|
|
||||||
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Transizione per i clickBox della home */
|
|
||||||
/* .clickBox {
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.clickBox:hover {
|
|
||||||
transform: scale(1.05);
|
|
||||||
box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
.clickBox:active {
|
|
||||||
transform: scale(0.98);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Spinner di caricamento */
|
|
||||||
.loading {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
min-height: 200px;
|
|
||||||
opacity: 0;
|
|
||||||
animation: fadeIn 0.3s ease-in forwards;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes fadeIn {
|
|
||||||
to {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.spinner {
|
|
||||||
width: 50px;
|
|
||||||
height: 50px;
|
|
||||||
border: 4px solid rgba(255, 255, 255, 0.3);
|
|
||||||
border-top-color: #fff;
|
|
||||||
border-radius: 50%;
|
|
||||||
animation: spin 0.8s linear infinite;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes spin {
|
|
||||||
to {
|
|
||||||
transform: rotate(360deg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Transizione per elementi che appaiono */
|
|
||||||
/*.content-page,
|
|
||||||
.station-list,
|
|
||||||
.player-container {
|
|
||||||
animation: fadeInContent 0.5s ease-out;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes fadeInContent {
|
|
||||||
from {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Transizione per le immagini */
|
|
||||||
/* .station-logo,
|
|
||||||
.station-logo-large {
|
|
||||||
transition: transform 0.3s ease, filter 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.station-logo:hover,
|
|
||||||
.station-logo-large:hover {
|
|
||||||
transform: scale(1.05);
|
|
||||||
filter: brightness(1.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Transizione per i pulsanti */
|
|
||||||
/* button,
|
|
||||||
.submit-btn,
|
|
||||||
.play-pause-btn {
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
button:hover,
|
|
||||||
.submit-btn:hover,
|
|
||||||
.play-pause-btn:hover {
|
|
||||||
transform: scale(1.05);
|
|
||||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
button:active,
|
|
||||||
.submit-btn:active,
|
|
||||||
.play-pause-btn:active {
|
|
||||||
transform: scale(0.95);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Transizione smooth per tutti gli elementi interattivi */
|
|
||||||
/* a, button, input, textarea, select {
|
|
||||||
transition: all 0.2s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* RIMOSSO: underline animato per il menu */
|
|
||||||
/* Non ci sono più after pseudo-elementi per le underline */
|
|
||||||
|
|
||||||
/* Transizione per il back-link */
|
|
||||||
/* .back-link a {
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.back-link a:hover {
|
|
||||||
transform: translateX(-5px);
|
|
||||||
color: #4a90e2;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Animazione per le liste */
|
|
||||||
/* .stations-container {
|
|
||||||
display: grid;
|
|
||||||
gap: 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.station-card {
|
|
||||||
animation: fadeInScale 0.4s ease-out backwards;
|
|
||||||
}
|
|
||||||
|
|
||||||
.station-card:nth-child(1) { animation-delay: 0.05s; }
|
|
||||||
.station-card:nth-child(2) { animation-delay: 0.1s; }
|
|
||||||
.station-card:nth-child(3) { animation-delay: 0.15s; }
|
|
||||||
.station-card:nth-child(4) { animation-delay: 0.2s; }
|
|
||||||
.station-card:nth-child(5) { animation-delay: 0.25s; }
|
|
||||||
|
|
||||||
@keyframes fadeInScale {
|
|
||||||
from {
|
|
||||||
opacity: 0;
|
|
||||||
transform: scale(0.95);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
opacity: 1;
|
|
||||||
transform: scale(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Transizione per i form */
|
|
||||||
/* .form-group input,
|
|
||||||
.form-group textarea,
|
|
||||||
.form-group select {
|
|
||||||
transition: border-color 0.3s ease, box-shadow 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-group input:focus,
|
|
||||||
.form-group textarea:focus,
|
|
||||||
.form-group select:focus {
|
|
||||||
border-color: #4a90e2;
|
|
||||||
box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Animazione per i messaggi di risposta */
|
|
||||||
/* .form-response {
|
|
||||||
animation: slideInDown 0.4s ease-out;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes slideInDown {
|
|
||||||
from {
|
|
||||||
opacity: 0;
|
|
||||||
transform: translateY(-20px);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
opacity: 1;
|
|
||||||
transform: translateY(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Transizione per video e iframe */
|
|
||||||
/* video,
|
|
||||||
iframe {
|
|
||||||
transition: opacity 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
video:hover,
|
|
||||||
iframe:hover {
|
|
||||||
opacity: 0.95;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Performance optimization */
|
|
||||||
/** {
|
|
||||||
-webkit-tap-highlight-color: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Smooth scrolling */
|
|
||||||
/* html {
|
|
||||||
scroll-behavior: smooth;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Riduzione movimento per chi ha impostato preferenze di accessibilità */
|
|
||||||
/*@media (prefers-reduced-motion: reduce) {
|
|
||||||
*,
|
|
||||||
*::before,
|
|
||||||
*::after {
|
|
||||||
animation-duration: 0.01ms !important;
|
|
||||||
animation-iteration-count: 1 !important;
|
|
||||||
transition-duration: 0.01ms !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.navLink.active::before {
|
|
||||||
animation: none !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Vendored
-12212
File diff suppressed because it is too large.
Load diff
@@ -1,8 +1,8 @@
|
|||||||
Copyright 2020 The Poppins Project Authors (https://github.com/itfoundry/Poppins)
|
Copyright 2022 The Bricolage Grotesque Project Authors (https://github.com/ateliertriay/bricolage)
|
||||||
|
|
||||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||||
This license is copied below, and is also available with a FAQ at:
|
This license is copied below, and is also available with a FAQ at:
|
||||||
https://openfontlicense.org
|
http://scripts.sil.org/OFL
|
||||||
|
|
||||||
|
|
||||||
-----------------------------------------------------------
|
-----------------------------------------------------------
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
Copyright 2020 The Plus Jakarta Sans Project Authors (https://github.com/tokotype/PlusJakartaSans) PlusJakartaSans-Italic[wght].ttf: Copyright 2020 The Plus Jakarta Sans Project Authors (https://github.com/tokotype/PlusJakartaSans)
|
||||||
|
|
||||||
|
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||||
|
This license is copied below, and is also available with a FAQ at:
|
||||||
|
http://scripts.sil.org/OFL
|
||||||
|
|
||||||
|
|
||||||
|
-----------------------------------------------------------
|
||||||
|
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||||
|
-----------------------------------------------------------
|
||||||
|
|
||||||
|
PREAMBLE
|
||||||
|
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||||
|
development of collaborative font projects, to support the font creation
|
||||||
|
efforts of academic and linguistic communities, and to provide a free and
|
||||||
|
open framework in which fonts may be shared and improved in partnership
|
||||||
|
with others.
|
||||||
|
|
||||||
|
The OFL allows the licensed fonts to be used, studied, modified and
|
||||||
|
redistributed freely as long as they are not sold by themselves. The
|
||||||
|
fonts, including any derivative works, can be bundled, embedded,
|
||||||
|
redistributed and/or sold with any software provided that any reserved
|
||||||
|
names are not used by derivative works. The fonts and derivatives,
|
||||||
|
however, cannot be released under any other type of license. The
|
||||||
|
requirement for fonts to remain under this license does not apply
|
||||||
|
to any document created using the fonts or their derivatives.
|
||||||
|
|
||||||
|
DEFINITIONS
|
||||||
|
"Font Software" refers to the set of files released by the Copyright
|
||||||
|
Holder(s) under this license and clearly marked as such. This may
|
||||||
|
include source files, build scripts and documentation.
|
||||||
|
|
||||||
|
"Reserved Font Name" refers to any names specified as such after the
|
||||||
|
copyright statement(s).
|
||||||
|
|
||||||
|
"Original Version" refers to the collection of Font Software components as
|
||||||
|
distributed by the Copyright Holder(s).
|
||||||
|
|
||||||
|
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||||
|
or substituting -- in part or in whole -- any of the components of the
|
||||||
|
Original Version, by changing formats or by porting the Font Software to a
|
||||||
|
new environment.
|
||||||
|
|
||||||
|
"Author" refers to any designer, engineer, programmer, technical
|
||||||
|
writer or other person who contributed to the Font Software.
|
||||||
|
|
||||||
|
PERMISSION & CONDITIONS
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||||
|
redistribute, and sell modified and unmodified copies of the Font
|
||||||
|
Software, subject to the following conditions:
|
||||||
|
|
||||||
|
1) Neither the Font Software nor any of its individual components,
|
||||||
|
in Original or Modified Versions, may be sold by itself.
|
||||||
|
|
||||||
|
2) Original or Modified Versions of the Font Software may be bundled,
|
||||||
|
redistributed and/or sold with any software, provided that each copy
|
||||||
|
contains the above copyright notice and this license. These can be
|
||||||
|
included either as stand-alone text files, human-readable headers or
|
||||||
|
in the appropriate machine-readable metadata fields within text or
|
||||||
|
binary files as long as those fields can be easily viewed by the user.
|
||||||
|
|
||||||
|
3) No Modified Version of the Font Software may use the Reserved Font
|
||||||
|
Name(s) unless explicit written permission is granted by the corresponding
|
||||||
|
Copyright Holder. This restriction only applies to the primary font name as
|
||||||
|
presented to the users.
|
||||||
|
|
||||||
|
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||||
|
Software shall not be used to promote, endorse or advertise any
|
||||||
|
Modified Version, except to acknowledge the contribution(s) of the
|
||||||
|
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||||
|
permission.
|
||||||
|
|
||||||
|
5) The Font Software, modified or unmodified, in part or in whole,
|
||||||
|
must be distributed entirely under this license, and must not be
|
||||||
|
distributed under any other license. The requirement for fonts to
|
||||||
|
remain under this license does not apply to any document created
|
||||||
|
using the Font Software.
|
||||||
|
|
||||||
|
TERMINATION
|
||||||
|
This license becomes null and void if any of the above conditions are
|
||||||
|
not met.
|
||||||
|
|
||||||
|
DISCLAIMER
|
||||||
|
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||||
|
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||||
|
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||||
|
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||||
|
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+2137
-629
File diff suppressed because it is too large.
Load diff
@@ -2,6 +2,20 @@
|
|||||||
|
|
||||||
<changelog>
|
<changelog>
|
||||||
|
|
||||||
|
<version>
|
||||||
|
<number>3.0.0</number>
|
||||||
|
<logs>
|
||||||
|
<log>Nuova interfaccia dell'app, disegnata sul tema RPIGroup Radio Theme dei siti del gruppo: colori del marchio, caratteri Bricolage Grotesque e Plus Jakarta Sans, card, tema scuro.</log>
|
||||||
|
<log>L'app è ora anche per computer: menu laterale e player in basso da 900px di larghezza; su telefono topbar e barra delle sezioni in basso. Rimossa la pagina intermedia "Entra su RPIGroup Play".</log>
|
||||||
|
<log>Player della radio persistente: la diretta continua mentre si naviga tra le pagine; brano in onda, cambio formato HLS/MP3, volume e controlli dalla schermata di blocco.</log>
|
||||||
|
<log>La radio parte subito quando si sceglie l'emittente; quando parte la TV o una puntata podcast la radio si mette in pausa.</log>
|
||||||
|
<log>Sezione Podcast con copertine e programma di ogni puntata; il tasto indietro torna all'elenco.</log>
|
||||||
|
<log>Rimossi Bootstrap, jQuery e Material Icons: icone SVG integrate, meno dati da scaricare.</log>
|
||||||
|
<log>Service worker aggiornato (cache v5) e manifest con orientamento libero.</log>
|
||||||
|
</logs>
|
||||||
|
</version>
|
||||||
|
|
||||||
|
|
||||||
<version>
|
<version>
|
||||||
<number>2.6.2</number>
|
<number>2.6.2</number>
|
||||||
<logs>
|
<logs>
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 0 B After Width: | Height: | Size: 12 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 0 B After Width: | Height: | Size: 28 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 259 KiB |
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 402 KiB |
@@ -5,7 +5,7 @@
|
|||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
# Author: A.S.V. Studios APPS
|
# Author: A.S.V. Studios APPS
|
||||||
# Website: https://app.rpigroup.net
|
# Website: https://app.rpigroup.net
|
||||||
# Copyright (c) 2025-202 A.S.V. Studios APPS
|
# Copyright (c) 2025-2026 A.S.V. Studios APPS
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
# Questa app è disponibile all'interno della repository pubblica di RPIGroup Play.
|
# Questa app è disponibile all'interno della repository pubblica di RPIGroup Play.
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
@@ -24,12 +24,8 @@ include_once './config/config.php';
|
|||||||
include_once './static/head.php';
|
include_once './static/head.php';
|
||||||
|
|
||||||
|
|
||||||
# Load Pages
|
# App shell (telefono e computer: stesso guscio, layout diverso in base alla larghezza)
|
||||||
if(!$show_app):
|
include_once './pages/app.php';
|
||||||
include_once './pages/desktop.php';
|
|
||||||
else:
|
|
||||||
include_once './pages/mobile.php';
|
|
||||||
endif;
|
|
||||||
|
|
||||||
|
|
||||||
# Import footer file
|
# Import footer file
|
||||||
|
|||||||
Vendored
-7
@@ -1,7 +0,0 @@
|
|||||||
/*!
|
|
||||||
* Bootstrap v5.1.3 (https://getbootstrap.com/)
|
|
||||||
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
||||||
*/
|
|
||||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e()}(this,(function(){"use strict";const t="transitionend",e=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),e=i&&"#"!==i?i.trim():null}return e},i=t=>{const i=e(t);return i&&document.querySelector(i)?i:null},n=t=>{const i=e(t);return i?document.querySelector(i):null},s=e=>{e.dispatchEvent(new Event(t))},o=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),r=t=>o(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(t):null,a=(t,e,i)=>{Object.keys(i).forEach((n=>{const s=i[n],r=e[n],a=r&&o(r)?"element":null==(l=r)?`${l}`:{}.toString.call(l).match(/\s([a-z]+)/i)[1].toLowerCase();var l;if(!new RegExp(s).test(a))throw new TypeError(`${t.toUpperCase()}: Option "${n}" provided type "${a}" but expected type "${s}".`)}))},l=t=>!(!o(t)||0===t.getClientRects().length)&&"visible"===getComputedStyle(t).getPropertyValue("visibility"),c=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),h=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?h(t.parentNode):null},d=()=>{},u=t=>{t.offsetHeight},f=()=>{const{jQuery:t}=window;return t&&!document.body.hasAttribute("data-bs-no-jquery")?t:null},p=[],m=()=>"rtl"===document.documentElement.dir,g=t=>{var e;e=()=>{const e=f();if(e){const i=t.NAME,n=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=n,t.jQueryInterface)}},"loading"===document.readyState?(p.length||document.addEventListener("DOMContentLoaded",(()=>{p.forEach((t=>t()))})),p.push(e)):e()},_=t=>{"function"==typeof t&&t()},b=(e,i,n=!0)=>{if(!n)return void _(e);const o=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const n=Number.parseFloat(e),s=Number.parseFloat(i);return n||s?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(i)+5;let r=!1;const a=({target:n})=>{n===i&&(r=!0,i.removeEventListener(t,a),_(e))};i.addEventListener(t,a),setTimeout((()=>{r||s(i)}),o)},v=(t,e,i,n)=>{let s=t.indexOf(e);if(-1===s)return t[!i&&n?t.length-1:0];const o=t.length;return s+=i?1:-1,n&&(s=(s+o)%o),t[Math.max(0,Math.min(s,o-1))]},y=/[^.]*(?=\..*)\.|.*/,w=/\..*/,E=/::\d+$/,A={};let T=1;const O={mouseenter:"mouseover",mouseleave:"mouseout"},C=/^(mouseenter|mouseleave)/i,k=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function L(t,e){return e&&`${e}::${T++}`||t.uidEvent||T++}function x(t){const e=L(t);return t.uidEvent=e,A[e]=A[e]||{},A[e]}function D(t,e,i=null){const n=Object.keys(t);for(let s=0,o=n.length;s<o;s++){const o=t[n[s]];if(o.originalHandler===e&&o.delegationSelector===i)return o}return null}function S(t,e,i){const n="string"==typeof e,s=n?i:e;let o=P(t);return k.has(o)||(o=t),[n,s,o]}function N(t,e,i,n,s){if("string"!=typeof e||!t)return;if(i||(i=n,n=null),C.test(e)){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};n?n=t(n):i=t(i)}const[o,r,a]=S(e,i,n),l=x(t),c=l[a]||(l[a]={}),h=D(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&s);const d=L(r,e.replace(y,"")),u=o?function(t,e,i){return function n(s){const o=t.querySelectorAll(e);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(let a=o.length;a--;)if(o[a]===r)return s.delegateTarget=r,n.oneOff&&j.off(t,s.type,e,i),i.apply(r,[s]);return null}}(t,i,n):function(t,e){return function i(n){return n.delegateTarget=t,i.oneOff&&j.off(t,n.type,e),e.apply(t,[n])}}(t,i);u.delegationSelector=o?i:null,u.originalHandler=r,u.oneOff=s,u.uidEvent=d,c[d]=u,t.addEventListener(a,u,o)}function I(t,e,i,n,s){const o=D(e[i],n,s);o&&(t.removeEventListener(i,o,Boolean(s)),delete e[i][o.uidEvent])}function P(t){return t=t.replace(w,""),O[t]||t}const j={on(t,e,i,n){N(t,e,i,n,!1)},one(t,e,i,n){N(t,e,i,n,!0)},off(t,e,i,n){if("string"!=typeof e||!t)return;const[s,o,r]=S(e,i,n),a=r!==e,l=x(t),c=e.startsWith(".");if(void 0!==o){if(!Line truncated
|
|
||||||
//# sourceMappingURL=bootstrap.bundle.min.js.map
|
|
||||||
+119
-195
@@ -1,236 +1,160 @@
|
|||||||
/**
|
/**
|
||||||
* PWA Install and Service Worker Helper
|
* RPIGroup Play - installazione come app (PWA) e registrazione del service worker
|
||||||
* Powered by Antigravity AI
|
*
|
||||||
|
* - Chrome/Edge (Android e computer): intercetta beforeinstallprompt e mostra i pulsanti [data-pwa-install]
|
||||||
|
* (sidebar, topbar) e, su telefono, il banner in basso.
|
||||||
|
* - iOS: niente prompt; i pulsanti aprono le istruzioni passo passo.
|
||||||
|
* - App già installata (standalone): niente inviti.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
const BASE_PATH = window.BASE_PATH || '';
|
'use strict';
|
||||||
|
|
||||||
|
var BASE = window.BASE_PATH || '';
|
||||||
|
|
||||||
// Register Service Worker
|
|
||||||
if ('serviceWorker' in navigator) {
|
if ('serviceWorker' in navigator) {
|
||||||
window.addEventListener('load', () => {
|
window.addEventListener('load', function () {
|
||||||
const swUrl = `${BASE_PATH}/sw.js`;
|
navigator.serviceWorker.register(BASE + '/sw.js').catch(function (error) {
|
||||||
navigator.serviceWorker.register(swUrl)
|
|
||||||
.then((registration) => {
|
|
||||||
console.log('[PWA] Service Worker registrato con successo:', registration.scope);
|
|
||||||
})
|
|
||||||
.catch((error) => {
|
|
||||||
console.error('[PWA] Registrazione Service Worker fallita:', error);
|
console.error('[PWA] Registrazione Service Worker fallita:', error);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Detectors
|
var isStandalone = window.matchMedia('(display-mode: standalone)').matches || window.navigator.standalone === true;
|
||||||
const isStandalone = window.matchMedia('(display-mode: standalone)').matches || window.navigator.standalone === true;
|
var isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
|
||||||
const isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
|
var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
||||||
const isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
|
||||||
|
|
||||||
// Se l'app viene aperta in modalità standalone (PWA) su desktop, reindirizza all'interno dell'app
|
|
||||||
if (isStandalone && !isMobile) {
|
|
||||||
const urlParams = new URLSearchParams(window.location.search);
|
|
||||||
if (!urlParams.has('app') || urlParams.get('app') !== 'true') {
|
|
||||||
const currentPath = window.location.pathname;
|
|
||||||
const pathWithoutBase = currentPath.replace(BASE_PATH, '').replace(/^\//, '');
|
|
||||||
const redirectParam = pathWithoutBase ? '&redirect=' + encodeURIComponent(pathWithoutBase) : '';
|
|
||||||
window.location.href = BASE_PATH + '/?app=true' + redirectParam;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Global variables
|
|
||||||
window.deferredPrompt = null;
|
window.deferredPrompt = null;
|
||||||
|
|
||||||
// Check if banner was dismissed in the last 7 days
|
function $(sel) { return document.querySelector(sel); }
|
||||||
|
function $$(sel) { return Array.prototype.slice.call(document.querySelectorAll(sel)); }
|
||||||
|
|
||||||
function isBannerDismissed() {
|
function isBannerDismissed() {
|
||||||
const dismissedTime = localStorage.getItem('pwa-banner-dismissed');
|
try {
|
||||||
if (!dismissedTime) return false;
|
var t = localStorage.getItem('pwa-banner-dismissed');
|
||||||
|
return t ? (Date.now() - parseInt(t, 10)) < 7 * 24 * 60 * 60 * 1000 : false;
|
||||||
|
} catch (e) { return false; }
|
||||||
|
}
|
||||||
|
|
||||||
const sevenDays = 7 * 24 * 60 * 60 * 1000;
|
function showBanner() {
|
||||||
return (Date.now() - parseInt(dismissedTime, 10)) < sevenDays;
|
var banner = $('#pwa-install-banner');
|
||||||
|
if (!banner || !isMobile || isBannerDismissed()) return;
|
||||||
|
banner.hidden = false;
|
||||||
|
setTimeout(function () { banner.classList.add('show'); }, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dismiss banner
|
|
||||||
function dismissBanner() {
|
function dismissBanner() {
|
||||||
localStorage.setItem('pwa-banner-dismissed', Date.now().toString());
|
try { localStorage.setItem('pwa-banner-dismissed', String(Date.now())); } catch (e) { /* niente archivio */ }
|
||||||
const banner = document.getElementById('pwa-install-banner');
|
hideBanner();
|
||||||
if (banner) {
|
}
|
||||||
|
|
||||||
|
function hideBanner() {
|
||||||
|
var banner = $('#pwa-install-banner');
|
||||||
|
if (!banner) return;
|
||||||
banner.classList.remove('show');
|
banner.classList.remove('show');
|
||||||
setTimeout(() => {
|
setTimeout(function () { banner.hidden = true; }, 400);
|
||||||
banner.style.display = 'none';
|
|
||||||
}, 400);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize UI components and listeners
|
function showButtons(show) {
|
||||||
function initPwaUI() {
|
$$('[data-pwa-install]').forEach(function (b) { b.hidden = !show; });
|
||||||
// If already in standalone mode, hide all promotional components
|
|
||||||
if (isStandalone) {
|
|
||||||
console.log('[PWA] Applicazione avviata in modalità Standalone. Nascondo elementi PWA.');
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const headerBtn = document.getElementById('pwa-header-install-btn');
|
function icon(name) {
|
||||||
const desktopBtn = document.getElementById('desktopPwaInstallBtn');
|
var paths = {
|
||||||
const banner = document.getElementById('pwa-install-banner');
|
share: '<path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"/><path d="m16 6-4-4-4 4M12 2v13"/>',
|
||||||
const bannerInstallBtn = document.getElementById('pwa-banner-install-btn');
|
plus: '<rect width="18" height="18" x="3" y="3" rx="2"/><path d="M8 12h8M12 8v8"/>',
|
||||||
const bannerCloseBtn = document.getElementById('pwa-banner-close-btn');
|
more: '<circle cx="12" cy="12" r="1"/><circle cx="12" cy="5" r="1"/><circle cx="12" cy="19" r="1"/>',
|
||||||
|
download: '<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><path d="m7 10 5 5 5-5M12 15V3"/>'
|
||||||
|
};
|
||||||
|
return '<span class="pwa-inline-icon"><svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">' + paths[name] + '</svg></span>';
|
||||||
|
}
|
||||||
|
|
||||||
|
function step(n, text) {
|
||||||
|
return '<div class="pwa-step"><div class="pwa-step-num">' + n + '</div><div class="pwa-step-text">' + text + '</div></div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
function showInstructionsModal() {
|
||||||
|
var modal = $('#pwa-instructions-modal');
|
||||||
|
var box = $('#pwa-instructions-content');
|
||||||
|
if (!modal || !box) return;
|
||||||
|
|
||||||
// On iOS, show the installation buttons immediately (as they don't support beforeinstallprompt)
|
|
||||||
if (isIOS) {
|
if (isIOS) {
|
||||||
console.log('[PWA] Rilevato dispositivo iOS');
|
box.innerHTML =
|
||||||
if (headerBtn) headerBtn.style.display = 'inline-flex';
|
step(1, "Tocca l'icona <strong>Condividi</strong> " + icon('share') + " nella barra di Safari.") +
|
||||||
if (desktopBtn) desktopBtn.style.display = 'inline-flex';
|
step(2, "Scorri l'elenco e scegli <strong>Aggiungi alla schermata Home</strong> " + icon('plus') + ".") +
|
||||||
|
step(3, "Tocca <strong>Aggiungi</strong> in alto a destra: l'icona compare sul telefono.");
|
||||||
if (banner && !isBannerDismissed()) {
|
} else if (isMobile) {
|
||||||
banner.style.display = 'flex';
|
box.innerHTML =
|
||||||
setTimeout(() => banner.classList.add('show'), 100);
|
step(1, "Apri il menu del browser con i <strong>tre puntini</strong> " + icon('more') + " in alto a destra.") +
|
||||||
}
|
step(2, "Scegli <strong>Installa app</strong> oppure <strong>Aggiungi a schermata Home</strong>.") +
|
||||||
}
|
step(3, "Conferma: RPIGroup Play si apre a schermo intero come un'app.");
|
||||||
|
|
||||||
// Attach click listeners to all PWA installation buttons
|
|
||||||
const triggerInstall = (e) => {
|
|
||||||
e.preventDefault();
|
|
||||||
|
|
||||||
if (window.deferredPrompt) {
|
|
||||||
// Show native install prompt (Android / Desktop Chrome / Edge)
|
|
||||||
window.deferredPrompt.prompt();
|
|
||||||
window.deferredPrompt.userChoice.then((choiceResult) => {
|
|
||||||
if (choiceResult.outcome === 'accepted') {
|
|
||||||
console.log('[PWA] Utente ha installato la PWA');
|
|
||||||
dismissBanner();
|
|
||||||
} else {
|
} else {
|
||||||
console.log('[PWA] Utente ha annullato l\'installazione');
|
box.innerHTML =
|
||||||
|
step(1, "Nella barra degli indirizzi del browser cerca l'icona <strong>Installa</strong> " + icon('download') + ".") +
|
||||||
|
step(2, "Oppure apri il menu del browser e scegli <strong>Installa RPIGroup Play</strong>.") +
|
||||||
|
step(3, "L'app si apre in una finestra sua, con la sua icona nel sistema.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
modal.hidden = false;
|
||||||
|
setTimeout(function () { modal.classList.add('show'); }, 10);
|
||||||
|
}
|
||||||
|
|
||||||
|
function closeModal() {
|
||||||
|
var modal = $('#pwa-instructions-modal');
|
||||||
|
if (!modal) return;
|
||||||
|
modal.classList.remove('show');
|
||||||
|
setTimeout(function () { modal.hidden = true; }, 300);
|
||||||
|
}
|
||||||
|
|
||||||
|
function triggerInstall(e) {
|
||||||
|
if (e) e.preventDefault();
|
||||||
|
if (window.deferredPrompt) {
|
||||||
|
window.deferredPrompt.prompt();
|
||||||
|
window.deferredPrompt.userChoice.then(function (choice) {
|
||||||
|
if (choice.outcome === 'accepted') dismissBanner();
|
||||||
window.deferredPrompt = null;
|
window.deferredPrompt = null;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// Fallback for iOS Safari or other unsupported prompts
|
|
||||||
showInstructionsModal();
|
showInstructionsModal();
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
|
||||||
if (headerBtn) headerBtn.addEventListener('click', triggerInstall);
|
|
||||||
if (desktopBtn) desktopBtn.addEventListener('click', triggerInstall);
|
|
||||||
if (bannerInstallBtn) bannerInstallBtn.addEventListener('click', triggerInstall);
|
|
||||||
|
|
||||||
if (bannerCloseBtn) {
|
|
||||||
bannerCloseBtn.addEventListener('click', (e) => {
|
|
||||||
e.preventDefault();
|
|
||||||
dismissBanner();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Modal Close logic
|
function initPwaUI() {
|
||||||
const modal = document.getElementById('pwa-instructions-modal');
|
if (isStandalone) return;
|
||||||
const modalCloseBtnTop = document.getElementById('pwa-modal-close-btn');
|
|
||||||
|
|
||||||
const closeModal = () => {
|
|
||||||
if (modal) {
|
|
||||||
modal.classList.remove('show');
|
|
||||||
setTimeout(() => {
|
|
||||||
modal.style.display = 'none';
|
|
||||||
}, 300);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
if (modalCloseBtnTop) modalCloseBtnTop.addEventListener('click', closeModal);
|
|
||||||
if (modal) {
|
|
||||||
modal.addEventListener('click', (e) => {
|
|
||||||
if (e.target === modal) closeModal();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Listen for beforeinstallprompt (Chrome / Android / Edge)
|
|
||||||
window.addEventListener('beforeinstallprompt', (e) => {
|
|
||||||
// Prevent Chrome 67 and earlier from automatically showing the prompt
|
|
||||||
e.preventDefault();
|
|
||||||
|
|
||||||
// Se siamo su desktop, non salviamo il prompt e non mostriamo nessun banner promozionale PWA
|
|
||||||
if (!isMobile) {
|
|
||||||
console.log('[PWA] Installazione via browser intercettata su desktop. Ignorata per requisiti.');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Stash the event so it can be triggered later.
|
|
||||||
window.deferredPrompt = e;
|
|
||||||
|
|
||||||
console.log('[PWA] Evento beforeinstallprompt intercettato.');
|
|
||||||
|
|
||||||
// Show custom buttons and banner (if not dismissed)
|
|
||||||
const headerBtn = document.getElementById('pwa-header-install-btn');
|
|
||||||
const desktopBtn = document.getElementById('desktopPwaInstallBtn');
|
|
||||||
const banner = document.getElementById('pwa-install-banner');
|
|
||||||
|
|
||||||
if (headerBtn) headerBtn.style.display = 'inline-flex';
|
|
||||||
if (desktopBtn) desktopBtn.style.display = 'inline-flex';
|
|
||||||
|
|
||||||
if (banner && !isBannerDismissed()) {
|
|
||||||
banner.style.display = 'flex';
|
|
||||||
setTimeout(() => banner.classList.add('show'), 100);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Track successful installation
|
|
||||||
window.addEventListener('appinstalled', () => {
|
|
||||||
console.log('[PWA] L\'applicazione è stata installata con successo.');
|
|
||||||
window.deferredPrompt = null;
|
|
||||||
|
|
||||||
// Hide all promotional components
|
|
||||||
const headerBtn = document.getElementById('pwa-header-install-btn');
|
|
||||||
const desktopBtn = document.getElementById('desktopPwaInstallBtn');
|
|
||||||
const banner = document.getElementById('pwa-install-banner');
|
|
||||||
|
|
||||||
if (headerBtn) headerBtn.style.display = 'none';
|
|
||||||
if (desktopBtn) desktopBtn.style.display = 'none';
|
|
||||||
if (banner) banner.style.display = 'none';
|
|
||||||
});
|
|
||||||
|
|
||||||
// Show instructions modal (iOS / Fallback)
|
|
||||||
function showInstructionsModal() {
|
|
||||||
const modal = document.getElementById('pwa-instructions-modal');
|
|
||||||
const content = document.getElementById('pwa-instructions-content');
|
|
||||||
if (!modal || !content) return;
|
|
||||||
|
|
||||||
|
// Su iOS i pulsanti compaiono subito (non esiste beforeinstallprompt)
|
||||||
if (isIOS) {
|
if (isIOS) {
|
||||||
content.innerHTML = `
|
showButtons(true);
|
||||||
<div class="pwa-step">
|
showBanner();
|
||||||
<div class="pwa-step-num">1</div>
|
|
||||||
<div class="pwa-step-text">Tocca l'icona di <strong>Condividi</strong> <span class="pwa-inline-icon"><i class="material-icons" style="font-size:18px; color:#f7b835;">share</i></span> (il quadrato con la freccia verso l'alto) nella barra in basso di Safari.</div>
|
|
||||||
</div>
|
|
||||||
<div class="pwa-step">
|
|
||||||
<div class="pwa-step-num">2</div>
|
|
||||||
<div class="pwa-step-text">Scorri l'elenco delle opzioni verso il basso e seleziona <strong>Aggiungi alla schermata Home</strong> <span class="pwa-inline-icon"><i class="material-icons" style="font-size:18px; color:#f7b835;">add_box</i></span>.</div>
|
|
||||||
</div>
|
|
||||||
<div class="pwa-step">
|
|
||||||
<div class="pwa-step-num">3</div>
|
|
||||||
<div class="pwa-step-text">Tocca <strong>Aggiungi</strong> nell'angolo in alto a destra per inserire l'icona sul tuo telefono.</div>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
} else {
|
|
||||||
content.innerHTML = `
|
|
||||||
<div class="pwa-step">
|
|
||||||
<div class="pwa-step-num">1</div>
|
|
||||||
<div class="pwa-step-text">Apri il menu delle impostazioni del browser toccando i <strong>tre puntini</strong> <span class="pwa-inline-icon"><i class="material-icons" style="font-size:18px; color:#f7b835;">more_vert</i></span> in alto a destra.</div>
|
|
||||||
</div>
|
|
||||||
<div class="pwa-step">
|
|
||||||
<div class="pwa-step-num">2</div>
|
|
||||||
<div class="pwa-step-text">Seleziona la voce <strong>Installa applicazione</strong> o <strong>Aggiungi a schermata Home</strong>.</div>
|
|
||||||
</div>
|
|
||||||
<div class="pwa-step">
|
|
||||||
<div class="pwa-step-num">3</div>
|
|
||||||
<div class="pwa-step-text">Conferma per scaricare la PWA sul tuo telefono.</div>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
modal.style.display = 'flex';
|
document.addEventListener('click', function (e) {
|
||||||
setTimeout(() => modal.classList.add('show'), 10);
|
if (e.target.closest('[data-pwa-install], #pwa-banner-install-btn')) triggerInstall(e);
|
||||||
|
});
|
||||||
|
|
||||||
|
var closeBtn = $('#pwa-banner-close-btn');
|
||||||
|
if (closeBtn) closeBtn.addEventListener('click', function (e) { e.preventDefault(); dismissBanner(); });
|
||||||
|
|
||||||
|
var modal = $('#pwa-instructions-modal');
|
||||||
|
var modalClose = $('#pwa-modal-close-btn');
|
||||||
|
if (modalClose) modalClose.addEventListener('click', closeModal);
|
||||||
|
if (modal) modal.addEventListener('click', function (e) { if (e.target === modal) closeModal(); });
|
||||||
|
document.addEventListener('keydown', function (e) { if (e.key === 'Escape') closeModal(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
// Run on DOM loaded
|
window.addEventListener('beforeinstallprompt', function (e) {
|
||||||
if (document.readyState === 'loading') {
|
e.preventDefault();
|
||||||
document.addEventListener('DOMContentLoaded', initPwaUI);
|
if (isStandalone) return;
|
||||||
} else {
|
window.deferredPrompt = e;
|
||||||
initPwaUI();
|
showButtons(true);
|
||||||
}
|
showBanner();
|
||||||
|
});
|
||||||
|
|
||||||
|
window.addEventListener('appinstalled', function () {
|
||||||
|
window.deferredPrompt = null;
|
||||||
|
showButtons(false);
|
||||||
|
hideBanner();
|
||||||
|
});
|
||||||
|
|
||||||
|
if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', initPwaUI);
|
||||||
|
else initPwaUI();
|
||||||
})();
|
})();
|
||||||
+13
-6
@@ -1,12 +1,17 @@
|
|||||||
{
|
{
|
||||||
"name": "RPIGroup Play",
|
"name": "RPIGroup Play",
|
||||||
"short_name": "RPIGroup Play",
|
"short_name": "RPIGroup Play",
|
||||||
"description": "Ascolta le tue stazioni radio preferite ovunque tu sia",
|
"description": "Le radio e le web TV del gruppo RPIGroup in un'unica app, con i podcast da riascoltare quando vuoi",
|
||||||
|
"id": "./",
|
||||||
"start_url": "./?app=true",
|
"start_url": "./?app=true",
|
||||||
|
"scope": "./",
|
||||||
"display": "standalone",
|
"display": "standalone",
|
||||||
"background_color": "#2a377e",
|
"display_override": ["standalone", "minimal-ui"],
|
||||||
"theme_color": "#2a377e",
|
"background_color": "#1c2555",
|
||||||
"orientation": "portrait",
|
"theme_color": "#1c2555",
|
||||||
|
"orientation": "any",
|
||||||
|
"lang": "it",
|
||||||
|
"categories": ["music", "entertainment", "news"],
|
||||||
"icons": [
|
"icons": [
|
||||||
{
|
{
|
||||||
"src": "img/icons/icon-72x72.png",
|
"src": "img/icons/icon-72x72.png",
|
||||||
@@ -36,7 +41,8 @@
|
|||||||
{
|
{
|
||||||
"src": "img/icons/icon-192x192.png",
|
"src": "img/icons/icon-192x192.png",
|
||||||
"sizes": "192x192",
|
"sizes": "192x192",
|
||||||
"type": "image/png"
|
"type": "image/png",
|
||||||
|
"purpose": "any"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "img/icons/icon-384x384.png",
|
"src": "img/icons/icon-384x384.png",
|
||||||
@@ -46,7 +52,8 @@
|
|||||||
{
|
{
|
||||||
"src": "img/icons/icon-512x512.png",
|
"src": "img/icons/icon-512x512.png",
|
||||||
"sizes": "512x512",
|
"sizes": "512x512",
|
||||||
"type": "image/png"
|
"type": "image/png",
|
||||||
|
"purpose": "any"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
+164
@@ -0,0 +1,164 @@
|
|||||||
|
<?php
|
||||||
|
// Guscio dell'app: sidebar (computer), topbar e tab bar (telefono), contenuto, dock del player.
|
||||||
|
// Il contenuto delle pagine arriva da ./pages/page/*.php, al primo caricamento qui e poi via AJAX (js/app.js).
|
||||||
|
$section = rpi_section($page, $param);
|
||||||
|
$nav_items = rpi_nav_items();
|
||||||
|
$legal = rpi_legal_links();
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="app-shell" id="app">
|
||||||
|
|
||||||
|
<!-- Sidebar: solo da 900px in su -->
|
||||||
|
<aside class="sidebar" aria-label="Menu principale">
|
||||||
|
<a href="<?= rpi_link('home') ?>" data-page="home" class="sidebar-brand">
|
||||||
|
<img src="<?=$base_path?>/img/RpiGroupPlayWHITE.png" alt="RPIGroup Play" width="200" height="56">
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<nav class="sidebar-nav">
|
||||||
|
<?php foreach ($nav_items as $n): ?>
|
||||||
|
<a href="<?= rpi_link($n['page']) ?>" data-page="<?= $n['page'] ?>" data-nav="<?= $n['page'] ?>"
|
||||||
|
class="nav-item <?= $section === $n['page'] ? 'is-active' : '' ?>"
|
||||||
|
<?= $section === $n['page'] ? 'aria-current="page"' : '' ?>>
|
||||||
|
<span class="nav-icon"><?= rpi_icon($n['icon'], 22) ?></span>
|
||||||
|
<span class="nav-label"><?= $n['label'] ?></span>
|
||||||
|
</a>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<div class="sidebar-foot">
|
||||||
|
<button type="button" class="btn btn-accent install-btn" data-pwa-install hidden>
|
||||||
|
<?= rpi_icon('download', 18) ?> Installa l'app
|
||||||
|
</button>
|
||||||
|
<nav class="legal-links" aria-label="Informazioni legali">
|
||||||
|
<?php foreach ($legal as $l): ?>
|
||||||
|
<a href="<?= rpi_link($l['page']) ?>" data-page="<?= $l['page'] ?>"><?= $l['label'] ?></a>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</nav>
|
||||||
|
<p class="sidebar-copy">© <?= date('Y') ?> RPIGroup · Versione <?= htmlspecialchars($version_app) ?><br>App powered by A.S.V. Studios APPS</p>
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
|
||||||
|
<!-- Topbar: solo su telefono -->
|
||||||
|
<header class="topbar">
|
||||||
|
<a href="<?= rpi_link('home') ?>" data-page="home" class="topbar-brand">
|
||||||
|
<img src="<?=$base_path?>/img/RpiGroupPlayWHITE.png" alt="RPIGroup Play" width="160" height="45">
|
||||||
|
</a>
|
||||||
|
<button type="button" class="icon-btn topbar-install" data-pwa-install hidden aria-label="Installa l'app">
|
||||||
|
<?= rpi_icon('download', 20) ?>
|
||||||
|
</button>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<!-- Barra di avanzamento durante il cambio pagina -->
|
||||||
|
<div class="route-progress" id="route-progress" aria-hidden="true"></div>
|
||||||
|
|
||||||
|
<main id="content" class="content" tabindex="-1">
|
||||||
|
<?php
|
||||||
|
$filePath = getPageFilePath($page, $param);
|
||||||
|
|
||||||
|
// Validazione specifica delle stazioni radio e tv per sicurezza
|
||||||
|
if ($page === 'play' && !empty($param)) {
|
||||||
|
$station = getRadioStation((int)$param);
|
||||||
|
if ($station === null) $filePath = './pages/page/404.php';
|
||||||
|
} elseif ($page === 'playtv' && !empty($param)) {
|
||||||
|
$station = getTVStation((int)$param);
|
||||||
|
if ($station === null) $filePath = './pages/page/404.php';
|
||||||
|
}
|
||||||
|
|
||||||
|
include $filePath;
|
||||||
|
?>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<!-- Tab bar: solo su telefono -->
|
||||||
|
<nav class="tabbar" aria-label="Sezioni">
|
||||||
|
<?php foreach ($nav_items as $n): ?>
|
||||||
|
<a href="<?= rpi_link($n['page']) ?>" data-page="<?= $n['page'] ?>" data-nav="<?= $n['page'] ?>"
|
||||||
|
class="tab-item <?= $section === $n['page'] ? 'is-active' : '' ?>"
|
||||||
|
<?= $section === $n['page'] ? 'aria-current="page"' : '' ?>>
|
||||||
|
<?= rpi_icon($n['icon'], 22) ?>
|
||||||
|
<span><?= $n['label'] ?></span>
|
||||||
|
</a>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<!-- Dock del player: compare quando si sceglie una radio e resta mentre si naviga -->
|
||||||
|
<aside id="player-dock" class="player-dock" aria-label="Player della radio" hidden>
|
||||||
|
<div class="player-inner">
|
||||||
|
<button type="button" id="dock-play" class="play-btn" aria-label="Ascolta">
|
||||||
|
<?= rpi_icon('play', 22, 'i-play') ?>
|
||||||
|
<?= rpi_icon('pause', 22, 'i-pause') ?>
|
||||||
|
<span class="spinner" aria-hidden="true"></span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<a id="dock-link" href="<?= rpi_link('radio') ?>" data-page="radio" class="dock-cover-link" aria-label="Apri la pagina della radio">
|
||||||
|
<img id="dock-cover" class="cover" src="<?=$base_path?>/img/logoapp.png" alt="" width="48" height="48">
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<div class="track-details">
|
||||||
|
<span class="live-tag">
|
||||||
|
<span class="live-dot"></span> Live
|
||||||
|
<span class="eq" aria-hidden="true"><span></span><span></span><span></span></span>
|
||||||
|
</span>
|
||||||
|
<p id="dock-title" class="track-title"></p>
|
||||||
|
<p id="dock-artist" class="track-artist"></p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button type="button" id="dock-format" class="format-chip" title="Cambia formato audio (HLS / MP3)" aria-label="Formato audio: HLS">HLS</button>
|
||||||
|
|
||||||
|
<div class="volume-container">
|
||||||
|
<button type="button" id="dock-mute" class="icon-btn" aria-label="Disattiva l'audio">
|
||||||
|
<?= rpi_icon('volume', 20, 'i-vol') ?>
|
||||||
|
<?= rpi_icon('mute', 20, 'i-mute') ?>
|
||||||
|
</button>
|
||||||
|
<input type="range" id="dock-volume" class="vol-slider" min="0" max="1" step="0.01" value="1" aria-label="Volume">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button type="button" id="dock-close" class="icon-btn dock-close" aria-label="Chiudi il player">
|
||||||
|
<?= rpi_icon('close', 18) ?>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<!-- preload="none": lo stream parte solo al play -->
|
||||||
|
<audio id="radio-audio" preload="none"></audio>
|
||||||
|
</aside>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- PWA: invito a installare (telefono) -->
|
||||||
|
<div id="pwa-install-banner" class="pwa-install-banner" hidden>
|
||||||
|
<div class="pwa-banner-content">
|
||||||
|
<img src="<?=$base_path?>/img/logoapp.png" alt="" class="pwa-banner-logo" width="48" height="48">
|
||||||
|
<div class="pwa-banner-text">
|
||||||
|
<div class="pwa-banner-title">RPIGroup Play</div>
|
||||||
|
<div class="pwa-banner-desc">Installa l'app: a schermo intero, sempre a portata di mano.</div>
|
||||||
|
</div>
|
||||||
|
<div class="pwa-banner-actions">
|
||||||
|
<button type="button" id="pwa-banner-install-btn" class="btn btn-accent btn-sm">Installa</button>
|
||||||
|
<button type="button" id="pwa-banner-close-btn" class="icon-btn" aria-label="Chiudi">
|
||||||
|
<?= rpi_icon('close', 18) ?>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- PWA: istruzioni per iOS e browser senza prompt -->
|
||||||
|
<div id="pwa-instructions-modal" class="pwa-modal-overlay" hidden>
|
||||||
|
<div class="pwa-modal-content" role="dialog" aria-modal="true" aria-labelledby="pwa-modal-title">
|
||||||
|
<div class="pwa-modal-header">
|
||||||
|
<h3 id="pwa-modal-title">Installa l'applicazione</h3>
|
||||||
|
<button type="button" id="pwa-modal-close-btn" class="icon-btn" aria-label="Chiudi">
|
||||||
|
<?= rpi_icon('close', 20) ?>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="pwa-modal-body">
|
||||||
|
<div class="pwa-modal-app-info">
|
||||||
|
<img src="<?=$base_path?>/img/logoapp.png" alt="" class="pwa-modal-logo" width="52" height="52">
|
||||||
|
<div>
|
||||||
|
<h4>RPIGroup Play</h4>
|
||||||
|
<p>Radio, web TV e podcast del gruppo RPIGroup</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="pwa-instructions-content" class="pwa-modal-steps">
|
||||||
|
<!-- Riempito da js/pwa-install.js in base al dispositivo -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -1,94 +0,0 @@
|
|||||||
<?php header('Content-Type: text/html; charset=UTF-8'); ?>
|
|
||||||
|
|
||||||
<div id="proradio-secondary-header" class="proradio-secondaryhead proradio-primary" style="border-bottom: solid 3px #3849a8;">
|
|
||||||
|
|
||||||
<style>
|
|
||||||
.rpigroup-topbar {
|
|
||||||
background: #2a367b;
|
|
||||||
padding: 0 40px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
height: 55px;
|
|
||||||
font-size: 0.8rem !important;
|
|
||||||
font-weight: 700;
|
|
||||||
font-family: 'Poppins';
|
|
||||||
letter-spacing: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rpigroup-topbar>a>.logo {
|
|
||||||
margin-right: 20px;
|
|
||||||
height: 40px;
|
|
||||||
display: flex;
|
|
||||||
border-right: solid 2px #3746a1;
|
|
||||||
padding-right: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rpigroup-topbar>a {
|
|
||||||
text-decoration: none;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rpigroup-topbar > .nolink {
|
|
||||||
margin-right: 15px;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rpigroup-topbar>a>.link {
|
|
||||||
padding: 19px 25px 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rpigroup-topbar>a>.link:hover {
|
|
||||||
background: #36449c;
|
|
||||||
border-bottom: 3px solid #36449c;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rpigroup-topbar>a>.active {
|
|
||||||
background: #00000044;
|
|
||||||
border-bottom: 3px solid #f7b932;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rpigroup-topbar>a>.active:hover {
|
|
||||||
background: #36449c;
|
|
||||||
border-bottom: 3px solid #f7b932;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<div class="rpigroup-topbar">
|
|
||||||
<a href="https://www.rpigroup.it/" target="_blank">
|
|
||||||
<img src="https://www.rpigroup.it/wp-content/uploads/2025/01/RpiGroup-Play-WHITE-NEW-e1737078263620.png" alt="logoRPIGroup" class="logo">
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<span class="nolink">Vai al sito di:</span>
|
|
||||||
<a href="https://www.radiocitta105.it" target="_blank"><span class="link">Radio Città 105</span></a>
|
|
||||||
<a href="https://www.radiodiffusionelibera.com" target="_blank"><span class="link">Radio DiffusioneLibera</span></a>
|
|
||||||
<a href="https://www.co-municare.it" target="_blank"><span class="link">Co-Municare.it</span></a>
|
|
||||||
<a href="https://www.ineboli.it" target="_blank"><span class="link">InEboli</span></a>
|
|
||||||
<a href="https://app.rpigroup.it" target="_blank"><span class="link active">RPIGroup Play</span></a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="dbox dbox-extra">
|
|
||||||
<img src="<?=$base_path?>/img/RpiGroupPlayWHITE.png" alt="Logo" style="width: 315px;">
|
|
||||||
<p class="subtitle"><i>Un nuovo modo di ascoltare musica</i></p>
|
|
||||||
<hr>
|
|
||||||
<?php
|
|
||||||
switch ($page){
|
|
||||||
case 'play':
|
|
||||||
if (!empty($param)) {
|
|
||||||
$stationId = (int)$param;
|
|
||||||
$station = getRadioStation($stationId);
|
|
||||||
echo 'Ascolta ora <b>' . htmlspecialchars($station->name) . '</b> su RPIGroup Play!';
|
|
||||||
}else{
|
|
||||||
echo 'Ascolta ora le tue radio preferite!';
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
echo 'Ascolta le nostre emittenti con la nostra nuova app disegnata per smartphone (e non...)';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<hr>
|
|
||||||
<a class="dbtn" id="openAppBtn" href="<?php echo $base_path . '/?app=true&redirect=' . urlencode($page . ($param ? '/' . $param : '')); ?>">ENTRA SU RPIGRPUP PLAY</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="dfooter">
|
|
||||||
App powered by A.S.V. Studios APPS • Versione App: <?php echo $version_app; ?>
|
|
||||||
</div>
|
|
||||||
@@ -1,97 +0,0 @@
|
|||||||
<?php
|
|
||||||
// Debug: verifica valori delle variabili (rimuovi dopo aver risolto)
|
|
||||||
// echo "<!-- DEBUG - Page: " . htmlspecialchars($page) . " | Param: " . htmlspecialchars($param) . " -->\n";
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div class="header">
|
|
||||||
<div class="logo-section">
|
|
||||||
<img src="<?=$base_path?>/img/RpiGroupPlayWHITE.png" alt="Logo">
|
|
||||||
</div>
|
|
||||||
<div class="menu-section" style="display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 5px;">
|
|
||||||
<a href="<?php echo $base_path; ?>/" data-page="home" class="navLink <?php echo $page == 'home' ? 'active' : ''; ?>">Home</a>
|
|
||||||
<a href="<?php echo $base_path; ?>/radio" data-page="radio" class="navLink <?php echo ($page == 'radio' || $page == 'play') ? 'active' : ''; ?>">Radio</a>
|
|
||||||
<a href="<?php echo $base_path; ?>/tv" data-page="tv" class="navLink <?php echo ($page == 'tv' || $page == 'playtv') ? 'active' : ''; ?>">TV</a>
|
|
||||||
<a href="<?php echo $base_path; ?>/podcast" data-page="podcast" class="navLink <?php echo ($page == 'page' && $param == 'addradio') ? 'active' : ''; ?>">Podcast</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<main class="container-fluid" id="content">
|
|
||||||
<?php
|
|
||||||
$filePath = getPageFilePath($page, $param);
|
|
||||||
|
|
||||||
// Validazione specifica delle stazioni radio e tv per sicurezza
|
|
||||||
if ($page === 'play' && !empty($param)) {
|
|
||||||
$stationId = (int)$param;
|
|
||||||
$station = getRadioStation($stationId);
|
|
||||||
if ($station === null) {
|
|
||||||
$filePath = './pages/page/404.php';
|
|
||||||
}
|
|
||||||
} elseif ($page === 'playtv' && !empty($param)) {
|
|
||||||
$stationId = (int)$param;
|
|
||||||
$station = getTVStation($stationId);
|
|
||||||
if ($station === null) {
|
|
||||||
$filePath = './pages/page/404.php';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
include $filePath;
|
|
||||||
?>
|
|
||||||
</main>
|
|
||||||
|
|
||||||
<!-- Loading Overlay -->
|
|
||||||
<div id="loadingOverlay" class="loading-overlay">
|
|
||||||
<div class="loading-content">
|
|
||||||
<div class="spinner-large"></div>
|
|
||||||
<p class="loading-text">Caricamento...</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="footer">
|
|
||||||
<div class="menu-section">
|
|
||||||
<a href="<?php echo $base_path; ?>/page/termini-condizioni" data-page="page/termini-condizioni" class="navLink">Termini e Condizioni</a> •
|
|
||||||
<a href="<?php echo $base_path; ?>/page/policy-privacy" data-page="page/policy-privacy" class="navLink">Policy Privacy</a> •
|
|
||||||
<a href="<?php echo $base_path; ?>/page/changelog" data-page="page/changelog" class="navLink">Changelog</a>
|
|
||||||
</div>
|
|
||||||
<div class="copyright-section" <?php if($is_mobile){ ?> style="padding: 10px 0 25px;" <?php } ?>>© 2025 RPIGroup • Versione: <?php echo $version_app; ?></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- PWA Install Banner (Mobile view bottom prompt) -->
|
|
||||||
<div id="pwa-install-banner" class="pwa-install-banner" style="display: none;">
|
|
||||||
<div class="pwa-banner-content">
|
|
||||||
<img src="<?=$base_path?>/img/logoapp.png" alt="App Logo" class="pwa-banner-logo">
|
|
||||||
<div class="pwa-banner-text">
|
|
||||||
<div class="pwa-banner-title">RPIGroup Play</div>
|
|
||||||
<div class="pwa-banner-desc">Installa l'app per ascoltare musica ovunque e a schermo intero!</div>
|
|
||||||
</div>
|
|
||||||
<div class="pwa-banner-actions">
|
|
||||||
<button id="pwa-banner-install-btn" class="pwa-banner-btn">SCARICA APP</button>
|
|
||||||
<button id="pwa-banner-close-btn" class="pwa-banner-close-btn">
|
|
||||||
<i class="material-icons" style="font-size: 18px; vertical-align: middle;">close</i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- PWA Instructions Modal (iOS Safari & Fallback) -->
|
|
||||||
<div id="pwa-instructions-modal" class="pwa-modal-overlay" style="display: none;">
|
|
||||||
<div class="pwa-modal-content">
|
|
||||||
<div class="pwa-modal-header">
|
|
||||||
<h3>Installa l'applicazione</h3>
|
|
||||||
<button id="pwa-modal-close-btn" class="pwa-modal-close-btn-top">
|
|
||||||
<i class="material-icons">close</i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="pwa-modal-body">
|
|
||||||
<div class="pwa-modal-app-info">
|
|
||||||
<img src="<?=$base_path?>/img/logoapp.png" alt="App Logo" class="pwa-modal-logo">
|
|
||||||
<div>
|
|
||||||
<h4 style="color: white; font-weight: 700; margin: 0;">RPIGroup Play</h4>
|
|
||||||
<p style="color: rgba(255,255,255,0.7); font-size: 0.8rem; margin: 2px 0 0;">Ascolta le tue stazioni radio preferite</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="pwa-instructions-content" class="pwa-modal-steps">
|
|
||||||
<!-- Will be populated dynamically by pwa-install.js -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
+35
-8
@@ -1,12 +1,39 @@
|
|||||||
<?php header('Content-Type: text/html; charset=UTF-8'); ?>
|
<section class="page-head not-found">
|
||||||
|
<span class="page-head-glow" aria-hidden="true"></span>
|
||||||
|
<?= rpi_motivo('page-head-motivo') ?>
|
||||||
|
<div class="container page-head-inner">
|
||||||
|
<div class="code" aria-hidden="true">
|
||||||
|
<span>4</span>
|
||||||
|
<span class="dial"><span class="needle"></span></span>
|
||||||
|
<span>4</span>
|
||||||
|
</div>
|
||||||
|
<span class="chip chip-live"><span class="live-dot"></span> Segnale assente</span>
|
||||||
|
<h1>Frequenza non trovata</h1>
|
||||||
|
<p class="subtitle">La pagina che cercavi non esiste o non è più disponibile. Nel frattempo la musica non si ferma: torna alla home o scegli una radio.</p>
|
||||||
|
<div class="hero-cta">
|
||||||
|
<a href="<?= rpi_link('home') ?>" data-page="home" class="btn btn-accent btn-lg"><?= rpi_icon('home', 18) ?> Torna alla home</a>
|
||||||
|
<a href="<?= rpi_link('radio') ?>" data-page="radio" class="btn btn-glass btn-lg"><?= rpi_icon('radio', 18) ?> Le radio</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
<div class="radio-header" style="padding: 20px; margin: 0 0 20px 0; border-bottom: 1px solid #eee; display: flex; align-items: center; justify-content: space-between;position: relative;background: white;">
|
<div class="page">
|
||||||
<div class="left-controls" style="display: flex; align-items: center;">
|
<div class="container">
|
||||||
<a href="<?php echo $base_path; ?>/home" data-page="home" class="linkBox" style="color: #333; display: flex; align-items: center; text-decoration: none;">
|
<div class="section-head">
|
||||||
<span class="material-icons" style="font-size: 28px;">arrow_back</span>
|
<div>
|
||||||
|
<span class="eyebrow">Forse cercavi</span>
|
||||||
|
<h2>Riprendi da qui</h2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="shortcut-grid">
|
||||||
|
<?php foreach (rpi_nav_items() as $n): if ($n['page'] === 'home') continue; ?>
|
||||||
|
<a href="<?= rpi_link($n['page']) ?>" data-page="<?= $n['page'] ?>" class="card card-link shortcut">
|
||||||
|
<span class="shortcut-icon"><?= rpi_icon($n['icon'], 22) ?></span>
|
||||||
|
<strong><?= $n['label'] ?></strong>
|
||||||
|
<span><?= $n['page'] === 'podcast' ? 'Riascolta le dirette' : ($n['page'] === 'tv' ? 'Le dirette video' : 'Le emittenti in diretta') ?></span>
|
||||||
|
<?= rpi_icon('arrow-right', 20, 'shortcut-arrow') ?>
|
||||||
</a>
|
</a>
|
||||||
<span style="font-size: 18px; font-weight: 600; color: #333; margin-left: 15px;">Pagina non trovata</span>
|
<?php endforeach; ?>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p class="text-center">La pagina che hai provato a cercare non esiste o non è disponibile.</p>
|
|
||||||
+33
-32
@@ -1,35 +1,36 @@
|
|||||||
<?php header('Content-Type: text/html; charset=UTF-8'); ?>
|
<?php
|
||||||
|
|
||||||
<div class="radio-header" style="padding: 20px; margin: 0 0 20px 0; border-bottom: 1px solid #eee; display: flex; align-items: center; justify-content: space-between;position: sticky;top: 0px;background: white;">
|
rpi_page_header([
|
||||||
<div class="left-controls" style="display: flex; align-items: center;">
|
'eyebrow' => 'Guida',
|
||||||
<a href="<?php echo $base_path; ?>/home" data-page="home" class="linkBox" style="color: #333; display: flex; align-items: center; text-decoration: none;">
|
'title' => 'Come funziona l\'app',
|
||||||
<span class="material-icons" style="font-size: 28px;">arrow_back</span>
|
'subtitle' => 'Radio, web TV e podcast del gruppo RPIGroup in un unico posto, su telefono e computer.',
|
||||||
</a>
|
]);
|
||||||
<span style="font-size: 18px; font-weight: 600; color: #333; margin-left: 15px;">Come funziona l'app</span>
|
?>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="tec px-4">
|
<div class="page">
|
||||||
<p>RPIGroup Play è l'applicazione che permette di ascoltare le radio e le webtv preferite in un unico luogo.</p>
|
<div class="container narrow">
|
||||||
<p>Per utilizzare l'applicazione, basta semplicemente entrare nell'applicazione dal link app.rpigroup.it, selezionare la sezione Radio o TV e scegliere la radio o la webtv che desideri ascoltare.</p>
|
<article class="card prose-card">
|
||||||
<br>
|
<div class="prose">
|
||||||
<p>
|
<p>RPIGroup Play è l'applicazione che permette di ascoltare le radio e guardare le web TV del gruppo RPIGroup, e di riascoltare le puntate dei programmi nella sezione Podcast.</p>
|
||||||
<b>Come installare l'app?</b></br>
|
<p>Per usarla basta aprire <strong>app.rpigroup.it</strong>, scegliere la sezione <strong>Radio</strong>, <strong>TV</strong> o <strong>Podcast</strong> e toccare l'emittente o la puntata che vuoi. La radio continua a suonare mentre navighi nell'app: il player resta in basso con il brano in onda.</p>
|
||||||
Per installare l'applicazione, basta semplicemente entrare nell'applicazione dal link app.rpigroup.it e cliccare sull'icona "Aggiungi all'Home". Oppure, per gli utenti iOS, entrando da safari dal link app.rpigroup.it, cliccare sull'icona "Convididi", scendere alla voce "Aggiungi all'Home" e cliccare su "Aggiungi all'Home".
|
|
||||||
</p>
|
<h2>Come installare l'app?</h2>
|
||||||
<br>
|
<p>Su <strong>Android</strong> e su <strong>computer</strong> (Chrome, Edge) tocca il pulsante <strong>Installa l'app</strong> quando compare, oppure usa la voce "Installa applicazione" del menu del browser.</p>
|
||||||
<br><br>
|
<p>Su <strong>iPhone e iPad</strong>, apri app.rpigroup.it da Safari, tocca l'icona <strong>Condividi</strong>, scorri fino a <strong>Aggiungi alla schermata Home</strong> e conferma con <strong>Aggiungi</strong>.</p>
|
||||||
<h2 class="text-start titlePage">F.A.Q.</h2>
|
|
||||||
<p>
|
<h2>Domande frequenti</h2>
|
||||||
<b>Posso scaricarla da Google Play Store e Apple App Store?</b></br>
|
<h3>Posso scaricarla da Google Play Store e Apple App Store?</h3>
|
||||||
Non è possibile al momento scaricare l'applicazione da Google Play Store e Apple App Store.
|
<p>Al momento l'app non è disponibile negli store: si installa direttamente dal browser come descritto sopra.</p>
|
||||||
</p>
|
|
||||||
<p>
|
<h3>Posso usare l'applicazione su un computer?</h3>
|
||||||
<b>Posso utilizzare l'applicazione su un computer?</b></br>
|
<p>Sì. Dal tuo browser preferito visita app.rpigroup.it: l'interfaccia si adatta allo schermo grande, con il menu laterale e il player in basso. L'app è anche installabile dal pulsante dedicato.</p>
|
||||||
Sì, dal tuo browser preferito, visita la pagina app.rpigroup.it. L'applicazione è anche installabile, cliccando sulla icona dedicata all'installazione della PWA.
|
|
||||||
</p>
|
<h3>Perché la radio ha un pulsante "HLS / MP3"?</h3>
|
||||||
<p>
|
<p>Le radio trasmettono in due formati. HLS si adatta alla qualità della connessione; se hai problemi di riproduzione prova a passare a MP3 toccando il pulsante nel player. La scelta viene ricordata.</p>
|
||||||
<b>Posso aggiungere la mia stazione radio preferita?</b></br>
|
|
||||||
Sì, cliccando sul pulsante "Aggiungi Radio" nella sezione Radio, potrai aggiungere la tua stazione radio preferita compilando il form dedicato.
|
<h3>Posso aggiungere la mia stazione radio preferita?</h3>
|
||||||
</p>
|
<p>Le emittenti presenti sono quelle iscritte al gruppo RPIGroup. Per proposte e segnalazioni usa la pagina Contatti o il modulo di feedback nella home.</p>
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
+39
-37
@@ -1,42 +1,44 @@
|
|||||||
<?php header('Content-Type: text/html; charset=UTF-8'); ?>
|
|
||||||
|
|
||||||
<div class="radio-header" style="padding: 20px; margin: 0 0 20px 0; border-bottom: 1px solid #eee; display: flex; align-items: center; justify-content: space-between;position: sticky;top: 0px;background: white; z-index: 2;">
|
|
||||||
<div class="left-controls" style="display: flex; align-items: center;">
|
|
||||||
<a href="<?php echo $base_path; ?>/home" data-page="home" class="linkBox" style="color: #333; display: flex; align-items: center; text-decoration: none;">
|
|
||||||
<span class="material-icons" style="font-size: 28px;">arrow_back</span>
|
|
||||||
</a>
|
|
||||||
<span style="font-size: 18px; font-weight: 600; color: #333; margin-left: 15px;">Changelog</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="px-4">
|
|
||||||
|
|
||||||
<p class="text-center" style="font-size: 0.9rem; font-weight: 300;">Codice dell'app visionabile su <a href="https://git.asv.ovh/asvstudiosapps/rpigroupplay" target="_blank" style="font-weight: 500;">ASV Git</a></p>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
// Verifica che $changelog sia stato caricato correttamente in getStation.inc.php
|
|
||||||
if (isset($changelog) && $changelog !== false && isset($changelog->version)) {
|
|
||||||
// Itera attraverso le versioni
|
|
||||||
foreach($changelog->version as $version) {
|
|
||||||
echo "<hr>";
|
|
||||||
echo "<p class=\"changelogTitle\">Versione " . htmlspecialchars((string)$version->number) . "</p>";
|
|
||||||
|
|
||||||
// Verifica che esistano i log prima di iterare
|
rpi_page_header([
|
||||||
if (isset($version->logs) && isset($version->logs->log)) {
|
'eyebrow' => 'Changelog',
|
||||||
foreach($version->logs->log as $log_print) {
|
'title' => 'Novità versione dopo versione',
|
||||||
echo "<p class=\"changelogList\">• " . htmlspecialchars((string)$log_print) . "</p>";
|
'subtitle' => 'Il codice dell\'app è pubblico su ASV Git.',
|
||||||
}
|
]);
|
||||||
} else {
|
|
||||||
echo "<p class=\"changelogList\" style=\"font-style: italic; color: #999;\">Nessun dettaglio disponibile per questa versione.</p>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// Messaggio di errore se il changelog non è disponibile
|
|
||||||
echo "<hr>";
|
|
||||||
echo "<div style=\"padding: 20px; background: #fff3cd; border: 1px solid #ffc107; border-radius: 5px; margin: 20px 0;\">";
|
|
||||||
echo "<p style=\"margin: 0; color: #856404;\"><strong>Attenzione:</strong> Impossibile caricare il changelog. Il file potrebbe essere mancante o corrotto.</p>";
|
|
||||||
echo "</div>";
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
<div class="page">
|
||||||
|
<div class="container narrow">
|
||||||
|
<p class="changelog-repo">
|
||||||
|
<?= rpi_icon('external', 16) ?>
|
||||||
|
Codice dell'app visionabile su <a href="https://git.asv.ovh/asvstudiosapps/rpigroupplay" target="_blank" rel="noopener">ASV Git</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<?php if (isset($changelog) && $changelog !== false && isset($changelog->version)): ?>
|
||||||
|
<div class="changelog-list">
|
||||||
|
<?php foreach ($changelog->version as $i => $version): ?>
|
||||||
|
<article class="card changelog-entry">
|
||||||
|
<div class="changelog-head">
|
||||||
|
<span class="chip <?= $i === 0 ? 'chip-accent' : 'chip-brand' ?>">Versione <?= htmlspecialchars((string)$version->number) ?></span>
|
||||||
|
<?php if ($i === 0): ?><span class="changelog-current">Attuale</span><?php endif; ?>
|
||||||
|
</div>
|
||||||
|
<?php if (isset($version->logs) && isset($version->logs->log)): ?>
|
||||||
|
<ul>
|
||||||
|
<?php foreach ($version->logs->log as $log): ?>
|
||||||
|
<li><?= htmlspecialchars((string)$log) ?></li>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</ul>
|
||||||
|
<?php else: ?>
|
||||||
|
<p class="changelog-empty">Nessun dettaglio disponibile per questa versione.</p>
|
||||||
|
<?php endif; ?>
|
||||||
|
</article>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</div>
|
||||||
|
<?php else: ?>
|
||||||
|
<div class="empty-state">
|
||||||
|
<?= rpi_icon('list', 40) ?>
|
||||||
|
<p>Impossibile caricare il changelog. Il file potrebbe essere mancante o danneggiato.</p>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
+15
-48
@@ -1,53 +1,20 @@
|
|||||||
<?php header('Content-Type: text/html; charset=UTF-8'); ?>
|
<?php
|
||||||
|
|
||||||
<!-- <div class="content-page">
|
rpi_page_header([
|
||||||
<h2>Contatti</h2>
|
'eyebrow' => 'Contatti',
|
||||||
<div class="content-box">
|
'title' => 'Scrivici',
|
||||||
<p>Hai domande, suggerimenti o riscontri problemi con l'applicazione? Contattaci!</p>
|
'subtitle' => 'Domande, suggerimenti o problemi con l\'app.',
|
||||||
|
]);
|
||||||
|
?>
|
||||||
|
|
||||||
<form class="contact-form" id="contactForm">
|
<div class="page">
|
||||||
<div class="form-group">
|
<div class="container narrow">
|
||||||
<label for="name">Nome:</label>
|
<article class="card prose-card">
|
||||||
<input type="text" id="name" name="name" required>
|
<div class="prose">
|
||||||
|
<p>La pagina è in fase di realizzazione: nel prossimo aggiornamento troverai qui i recapiti e le istruzioni per contattarci.</p>
|
||||||
|
<p>Nel frattempo puoi lasciarci un messaggio con il modulo di feedback.</p>
|
||||||
|
<p><a href="https://drive.asv.ovh/apps/forms/s/Zfk8cJk3oCz2Y2dHyWdEcgL7" target="_blank" rel="noopener" class="btn btn-accent">Lascia un feedback <?= rpi_icon('external', 16) ?></a></p>
|
||||||
</div>
|
</div>
|
||||||
|
</article>
|
||||||
<div class="form-group">
|
|
||||||
<label for="email">Email:</label>
|
|
||||||
<input type="email" id="email" name="email" required>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="subject">Oggetto:</label>
|
|
||||||
<input type="text" id="subject" name="subject" required>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="message">Messaggio:</label>
|
|
||||||
<textarea id="message" name="message" rows="5" required></textarea>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<button type="submit" class="submit-btn">Invia messaggio</button>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<div id="formResponse" class="form-response" style="display: none;"></div>
|
|
||||||
|
|
||||||
<div class="contact-info">
|
|
||||||
<h3>Informazioni di contatto</h3>
|
|
||||||
<p>Email: info@tuoaggregatore.it</p>
|
|
||||||
<p>Telefono: +39 123 456 7890</p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div> -->
|
|
||||||
|
|
||||||
<div class="radio-header" style="padding: 20px; margin: 0 0 20px 0; border-bottom: 1px solid #eee; display: flex; align-items: center; justify-content: space-between;position: sticky;top: 0px;background: white;">
|
|
||||||
<div class="left-controls" style="display: flex; align-items: center;">
|
|
||||||
<a href="<?php echo $base_path; ?>/home" data-page="home" class="linkBox" style="color: #333; display: flex; align-items: center; text-decoration: none;">
|
|
||||||
<span class="material-icons" style="font-size: 28px;">arrow_back</span>
|
|
||||||
</a>
|
|
||||||
<span style="font-size: 18px; font-weight: 600; color: #333; margin-left: 15px;">Contatti</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="tec px-4">
|
|
||||||
<p>La pagina è in fase di realizzazione... Attendi il prossimo aggiornamento per leggere le nostre istruzioni d'uso!</p>
|
|
||||||
</div>
|
|
||||||
+18
-14
@@ -1,17 +1,21 @@
|
|||||||
<?php header('Content-Type: text/html; charset=UTF-8'); ?>
|
<?php
|
||||||
|
|
||||||
<div class="radio-header" style="padding: 20px; margin: 0 0 20px 0; border-bottom: 1px solid #eee; display: flex; align-items: center; justify-content: space-between;position: sticky;top: 0px;background: white;">
|
rpi_page_header([
|
||||||
<div class="left-controls" style="display: flex; align-items: center;">
|
'eyebrow' => 'Informazioni',
|
||||||
<a href="<?php echo $base_path; ?>/home" data-page="home" class="linkBox" style="color: #333; display: flex; align-items: center; text-decoration: none;">
|
'title' => 'Diritti d\'autore',
|
||||||
<span class="material-icons" style="font-size: 28px;">arrow_back</span>
|
'subtitle' => 'Come funzionano le licenze dei contenuti trasmessi nell\'app.',
|
||||||
</a>
|
]);
|
||||||
<span style="font-size: 18px; font-weight: 600; color: #333; margin-left: 15px;">Diritti D'Autore</span>
|
?>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="tec px-4">
|
<div class="page">
|
||||||
<p>RPIGroup è un player audio e video, che aggrega i flussi audio in streaming di emittenti iscritte all'interno del gruppo RPIGroup.</p>
|
<div class="container narrow">
|
||||||
<p>I flussi presenti all'interno della seguente app non provvengono direttamente da quest'ultima, ma dal sito web dell'emittente stessa.</p>
|
<article class="card prose-card">
|
||||||
<p>L'applicazione funge come semplice ripetitore audio. Per tanto, i diritti musicali sono a carico dell'emittente presente nell'app, inserendo all'interno della pagina dedicata alle informazioni sulla trasmissione, i numeri licenze dei diritti d'autore e discografici dei brani trasmessi.</p>
|
<div class="prose">
|
||||||
<p>Pertanto, se si ritiene che una delle emittenti non ha le licenze per la diffusione dei brani, invitiamo al segnalante di inoltrare una mail ad <a href="mailto:abuse@asvhosting.com">abuse@asvhosting.com</a> per la rimozione definitiva dell'emittente.</p>
|
<p>RPIGroup Play è un player audio e video che aggrega i flussi in streaming delle emittenti iscritte al gruppo RPIGroup.</p>
|
||||||
|
<p>I flussi presenti nell'app non provengono dall'app stessa, ma dal sito web dell'emittente che li trasmette.</p>
|
||||||
|
<p>L'applicazione funge da semplice ripetitore. I diritti musicali sono quindi a carico dell'emittente presente nell'app, che riporta nella propria pagina informativa i numeri di licenza dei diritti d'autore e discografici dei brani trasmessi.</p>
|
||||||
|
<p>Se ritieni che una delle emittenti non abbia le licenze per la diffusione dei brani, scrivi a <a href="mailto:abuse@asvhosting.com">abuse@asvhosting.com</a> per chiederne la rimozione.</p>
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
+146
-97
@@ -1,114 +1,163 @@
|
|||||||
<?php header('Content-Type: text/html; charset=UTF-8'); ?>
|
<?php
|
||||||
|
|
||||||
<h1 class="titlePage">Benvenuto</h1>
|
$stations = loadRadioStations();
|
||||||
<p class="subtitlePage">nella nuova RPIGroup Play</p>
|
$tv_stations = loadTVStations();
|
||||||
|
$n_radio = count($stations);
|
||||||
|
$n_tv = count($tv_stations);
|
||||||
|
?>
|
||||||
|
|
||||||
<div class="row gx-2 mb-4 px-4" style="width: 100%">
|
<!-- Apertura: slogan dell'app, accesso rapido a radio e TV -->
|
||||||
<div class="col-6">
|
<section class="hero">
|
||||||
<a href="<?php echo $base_path; ?>/radio" data-page="radio" class="linkBox">
|
<div class="hero-bg" aria-hidden="true">
|
||||||
<div class="clickBox Squared p-2">
|
<span class="blob blob-a"></span>
|
||||||
<img src="<?=$base_path?>/img/radio.png" alt="Radio">
|
<span class="blob blob-b"></span>
|
||||||
<p class="m-0 p-0">Radio</p>
|
<?= rpi_motivo('hero-motivo') ?>
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="col-6">
|
|
||||||
<a href="<?php echo $base_path; ?>/tv" data-page="tv" class="linkBox">
|
|
||||||
<div class="clickBox Squared p-2">
|
|
||||||
<img src="<?=$base_path?>/img/tv.png" alt="tv">
|
|
||||||
<p class="m-0 p-0">TV</p>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="col-12">
|
|
||||||
<a href="<?php echo $base_path; ?>/podcast" data-page="podcast" class="linkBox">
|
|
||||||
<div class="clickBox Squared">
|
|
||||||
<p class="m-0 p-0">PODCAST</p>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="container hero-inner">
|
||||||
|
<span class="chip chip-live hero-chip"><span class="live-dot"></span> In diretta ora</span>
|
||||||
|
<h1 class="hero-title">Un nuovo modo di <span class="hl">ascoltare musica.</span></h1>
|
||||||
|
<p class="hero-lead">Benvenuto in RPIGroup Play: le radio e le web TV del gruppo RPIGroup in un'unica app, con i podcast da riascoltare quando vuoi.</p>
|
||||||
</div>
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
<style>
|
<div class="page home-page">
|
||||||
.content-adv{
|
<div class="container">
|
||||||
text-align: center;
|
|
||||||
background: #3849a8;
|
|
||||||
padding: 20px;
|
|
||||||
border-radius: 20px;
|
|
||||||
}
|
|
||||||
.content-adv:before{
|
|
||||||
content: "ADV";
|
|
||||||
position: relative;
|
|
||||||
background: #f7b835;
|
|
||||||
padding: 3px 10px;
|
|
||||||
font-size: 0.8rem;
|
|
||||||
border-radius: 27px;
|
|
||||||
font-style: italic;
|
|
||||||
font-weight: 600;
|
|
||||||
top: -10px;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
.content-adv img{
|
|
||||||
max-width: 100%;
|
|
||||||
border-radius: 10px;
|
|
||||||
margin-top: -20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content-adv p{
|
<!-- Le tre sezioni, sovrapposte al fondo dell'apertura -->
|
||||||
color: white;
|
<section class="tiles" aria-label="Sezioni dell'app">
|
||||||
font-size: 0.8rem;
|
<a href="<?= rpi_link('radio') ?>" data-page="radio" class="card card-link tile">
|
||||||
font-weight: 600;
|
<span class="tile-icon"><?= rpi_icon('radio', 24) ?></span>
|
||||||
padding: 0;
|
<span class="tile-text">
|
||||||
margin: 0;
|
<strong>Radio</strong>
|
||||||
}
|
<span><?= $n_radio ?> <?= $n_radio === 1 ? 'emittente' : 'emittenti' ?> in diretta</span>
|
||||||
</style>
|
</span>
|
||||||
|
<?= rpi_icon('arrow-right', 20, 'tile-arrow') ?>
|
||||||
|
</a>
|
||||||
|
<a href="<?= rpi_link('tv') ?>" data-page="tv" class="card card-link tile">
|
||||||
|
<span class="tile-icon"><?= rpi_icon('tv', 24) ?></span>
|
||||||
|
<span class="tile-text">
|
||||||
|
<strong>TV</strong>
|
||||||
|
<span><?= $n_tv ?> <?= $n_tv === 1 ? 'canale' : 'canali' ?> in streaming</span>
|
||||||
|
</span>
|
||||||
|
<?= rpi_icon('arrow-right', 20, 'tile-arrow') ?>
|
||||||
|
</a>
|
||||||
|
<a href="<?= rpi_link('podcast') ?>" data-page="podcast" class="card card-link tile">
|
||||||
|
<span class="tile-icon"><?= rpi_icon('mic', 24) ?></span>
|
||||||
|
<span class="tile-text">
|
||||||
|
<strong>Podcast</strong>
|
||||||
|
<span>Riascolta le dirette</span>
|
||||||
|
</span>
|
||||||
|
<?= rpi_icon('arrow-right', 20, 'tile-arrow') ?>
|
||||||
|
</a>
|
||||||
|
</section>
|
||||||
|
|
||||||
<!-- <div class="content-adv mb-4 hiddenApp">
|
<?php if ($n_radio > 0): ?>
|
||||||
<a href="https://play.google.com/apps/testing/it.asvstudios.rpigroupplay" target="_blank" class="">
|
<section class="section-sm">
|
||||||
<img src="https://play.google.com/intl/it_IT/badges/static/images/badges/en_badge_web_generic.png" alt="Google Play Store">
|
<div class="section-head">
|
||||||
<p>Entra nel programma di beta testing di RPIGroup Play per Google Play Store (Android)</p>
|
<div>
|
||||||
<p style="font-size: 10px; margin-top: 15px; text-decoration: underline;">Clicca qui per scoprire di più</p>
|
<span class="eyebrow">Radio</span>
|
||||||
|
<h2>Le emittenti</h2>
|
||||||
|
</div>
|
||||||
|
<a href="<?= rpi_link('radio') ?>" data-page="radio" class="btn btn-ghost btn-sm">
|
||||||
|
Tutte le radio <?= rpi_icon('arrow-right', 16) ?>
|
||||||
</a>
|
</a>
|
||||||
</div> -->
|
</div>
|
||||||
|
<div class="station-grid">
|
||||||
|
<?php foreach ($stations as $st): ?>
|
||||||
|
<a href="<?= rpi_link('play/' . $st->id) ?>" data-page="play/<?= $st->id ?>" class="card card-link station-card">
|
||||||
|
<span class="cover">
|
||||||
|
<img src="<?= htmlspecialchars($st->logo) ?>" alt="" loading="lazy" decoding="async">
|
||||||
|
<span class="play" aria-hidden="true"><?= rpi_icon('play', 18) ?></span>
|
||||||
|
<?php if ((string)$st->thematic === 'true'): ?><span class="chip chip-accent thematic">Tematica</span><?php endif; ?>
|
||||||
|
</span>
|
||||||
|
<span class="body">
|
||||||
|
<h3><?= htmlspecialchars($st->name) ?></h3>
|
||||||
|
<p><?= htmlspecialchars($st->slogan) ?></p>
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if ($n_tv > 0): ?>
|
||||||
|
<section class="section-sm">
|
||||||
|
<div class="section-head">
|
||||||
|
<div>
|
||||||
|
<span class="eyebrow">Web TV</span>
|
||||||
|
<h2>Guarda la diretta</h2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="station-grid tv-grid">
|
||||||
|
<?php foreach ($tv_stations as $st): ?>
|
||||||
|
<a href="<?= rpi_link('playtv/' . $st->id) ?>" data-page="playtv/<?= $st->id ?>" class="card card-link station-card is-tv">
|
||||||
|
<span class="cover">
|
||||||
|
<img src="<?= htmlspecialchars(!empty($st->poster) ? $st->poster : $st->logo) ?>" alt="" loading="lazy" decoding="async">
|
||||||
|
<span class="play" aria-hidden="true"><?= rpi_icon('play', 18) ?></span>
|
||||||
|
<span class="chip chip-live tv-chip"><span class="live-dot"></span> Live</span>
|
||||||
|
</span>
|
||||||
|
<span class="body">
|
||||||
|
<h3><?= htmlspecialchars($st->name) ?></h3>
|
||||||
|
<p>Web TV in streaming</p>
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
<div class="row gx-2 mb-4 px-4" style="width: 100%">
|
<section class="section-sm">
|
||||||
<div class="col-12">
|
<div class="section-head">
|
||||||
<a href="https://www.co-municare.it" target="_blank" class="">
|
<div>
|
||||||
<div class="clickBox">
|
<span class="eyebrow">Scopri</span>
|
||||||
<img src="https://www.co-municare.it/wp-content/uploads/2025/01/newlogo_co-municare-it.png" alt="logo Co-Municare.it">
|
<h2>Informazioni</h2>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="shortcut-grid">
|
||||||
|
<a href="<?= rpi_link('page/about') ?>" data-page="page/about" class="card card-link shortcut">
|
||||||
|
<span class="shortcut-icon"><?= rpi_icon('help', 22) ?></span>
|
||||||
|
<strong>Come funziona?</strong>
|
||||||
|
<span>Guida all'uso e installazione dell'app</span>
|
||||||
|
<?= rpi_icon('arrow-right', 20, 'shortcut-arrow') ?>
|
||||||
|
</a>
|
||||||
|
<a href="<?= rpi_link('page/copyright') ?>" data-page="page/copyright" class="card card-link shortcut">
|
||||||
|
<span class="shortcut-icon"><?= rpi_icon('copyright', 22) ?></span>
|
||||||
|
<strong>Diritti d'autore</strong>
|
||||||
|
<span>Licenze e segnalazioni</span>
|
||||||
|
<?= rpi_icon('arrow-right', 20, 'shortcut-arrow') ?>
|
||||||
|
</a>
|
||||||
|
<a href="<?= rpi_link('page/contact') ?>" data-page="page/contact" class="card card-link shortcut">
|
||||||
|
<span class="shortcut-icon"><?= rpi_icon('mail', 22) ?></span>
|
||||||
|
<strong>I nostri contatti</strong>
|
||||||
|
<span>Scrivici per domande e suggerimenti</span>
|
||||||
|
<?= rpi_icon('arrow-right', 20, 'shortcut-arrow') ?>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4">
|
</section>
|
||||||
<a href="<?php echo $base_path; ?>/page/about" data-page="page/about" class="linkBox">
|
|
||||||
<div class="clickBox">
|
|
||||||
Come<br>funziona?
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="col-4">
|
|
||||||
<a href="<?php echo $base_path; ?>/page/copyright" data-page="page/copyright" class="linkBox">
|
|
||||||
<div class="clickBox">
|
|
||||||
Diritti<br>d'Autore
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="col-4">
|
|
||||||
<a href="<?php echo $base_path; ?>/page/contact" data-page="page/contact" class="linkBox">
|
|
||||||
<div class="clickBox">
|
|
||||||
I nostri<br>Contatti
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row gx-2 mb-4 px-4" style="width: 100%">
|
<section class="section-sm partner-grid">
|
||||||
<div class="col-12">
|
<a href="https://www.co-municare.it" target="_blank" rel="noopener" class="card card-link partner-card">
|
||||||
<a href="https://drive.asv.ovh/apps/forms/s/Zfk8cJk3oCz2Y2dHyWdEcgL7" target="_blank" class="linkBox">
|
<span class="eyebrow">Dal gruppo RPIGroup</span>
|
||||||
<div class="clickBox p-2">
|
<img src="https://www.co-municare.it/wp-content/uploads/2025/01/newlogo_co-municare-it.png" alt="Co-Municare.it" loading="lazy" decoding="async">
|
||||||
Lascia un feedback
|
<span class="partner-link">Visita co-municare.it <?= rpi_icon('external', 16) ?></span>
|
||||||
</div>
|
|
||||||
</a>
|
</a>
|
||||||
|
<a href="https://drive.asv.ovh/apps/forms/s/Zfk8cJk3oCz2Y2dHyWdEcgL7" target="_blank" rel="noopener" class="card card-link feedback-card">
|
||||||
|
<span class="shortcut-icon"><?= rpi_icon('message', 22) ?></span>
|
||||||
|
<strong>Lascia un feedback</strong>
|
||||||
|
<span>Dicci cosa ne pensi dell'app: idee, problemi, consigli.</span>
|
||||||
|
<span class="partner-link">Apri il modulo <?= rpi_icon('external', 16) ?></span>
|
||||||
|
</a>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- Su telefono i link legali stanno qui; su computer sono nella sidebar -->
|
||||||
|
<footer class="mobile-footer">
|
||||||
|
<nav class="legal-links" aria-label="Informazioni legali">
|
||||||
|
<?php foreach (rpi_legal_links() as $l): ?>
|
||||||
|
<a href="<?= rpi_link($l['page']) ?>" data-page="<?= $l['page'] ?>"><?= $l['label'] ?></a>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</nav>
|
||||||
|
<p>© <?= date('Y') ?> RPIGroup · Versione <?= htmlspecialchars($version_app) ?><br>App powered by A.S.V. Studios APPS</p>
|
||||||
|
</footer>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
+31
-89
@@ -1,102 +1,44 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// Vista di una radio: barra con "torna a Radio", nome e pulsante Ascolta; sotto, il contenuto della radio
|
||||||
|
// (pagina contentrpigplay del sito, in un iframe) oppure, se la radio non ne ha uno, una scheda con logo e brano.
|
||||||
|
// L'audio non sta qui: lo gestisce il dock del player nel guscio dell'app (js/app.js legge data-station).
|
||||||
|
if (!isset($station) || empty($station)) {
|
||||||
|
include './pages/page/404.php';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$station_id = (string)$station->id;
|
|
||||||
$station_name = (string)$station->name;
|
$station_name = (string)$station->name;
|
||||||
$station_slogan = (string)$station->slogan;
|
$station_slogan = (string)$station->slogan;
|
||||||
$station_logo = (string)$station->logo;
|
$station_logo = (string)$station->logo;
|
||||||
$station_stream = (string)$station->stream;
|
$content_url = (string)$station->contentplayer;
|
||||||
$station_streamhls = (string)$station->streamhls;
|
|
||||||
$station_contentplayer = (string)$station->contentplayer;
|
|
||||||
$station_apiradio = (string)$station->apiradio;
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="radio-player-container" style="background-color: #ffffff;height: calc(100% - <?php if($is_mobile){ echo "232px"; }else{ echo "217px"; } ?>);position: absolute;left: calc(50%);display: flex;flex-direction: column;max-width: 750px;transform: translateX(-50%);width: 100%;">
|
<section class="station-view fill-view" data-station="<?= rpi_station_json($station) ?>" aria-label="<?= htmlspecialchars($station_name) ?>">
|
||||||
|
|
||||||
<div class="radio-header" style="padding: 20px; border-bottom: 1px solid #eee; display: flex; align-items: center; justify-content: space-between;">
|
<div class="view-bar">
|
||||||
<div class="left-controls" style="display: flex; align-items: center;">
|
<?= rpi_back_pill('radio', 'Radio') ?>
|
||||||
<a href="<?php echo $base_path; ?>/radio" data-page="radio" class="linkBox" style="color: #333; display: flex; align-items: center; text-decoration: none;">
|
<div class="view-title">
|
||||||
<span class="material-icons" style="font-size: 28px;">arrow_back</span>
|
<strong><?= htmlspecialchars($station_name) ?></strong>
|
||||||
</a>
|
<span><?= htmlspecialchars($station_slogan) ?></span>
|
||||||
<span style="font-size: 18px; font-weight: 600; color: #333; margin-left: 15px;"><?php echo $station_name; ?></span>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php if(!empty($station_logo)): ?>
|
<?php if ($content_url !== ''): ?>
|
||||||
<div class="right-controls">
|
<!-- Contenuti della radio (in onda, interazioni, palinsesto): pagina del sito pensata per l'app -->
|
||||||
<img src="<?php echo $station_logo; ?>" alt="Logo" style="height: 30px; width: auto;">
|
<iframe src="<?= htmlspecialchars($content_url) ?>" class="contentplayer" title="Contenuti di <?= htmlspecialchars($station_name) ?>" allow="autoplay" referrerpolicy="strict-origin-when-cross-origin"></iframe>
|
||||||
|
<?php else: ?>
|
||||||
|
<div class="station-static">
|
||||||
|
<div class="station-static-bg" aria-hidden="true">
|
||||||
|
<span class="blob blob-a"></span>
|
||||||
|
<?= rpi_motivo('station-static-motivo') ?>
|
||||||
|
</div>
|
||||||
|
<div class="station-static-card">
|
||||||
|
<img data-np="cover" class="static-cover" src="<?= htmlspecialchars($station_logo) ?>" alt="" width="220" height="220">
|
||||||
|
<span class="chip chip-live"><span class="live-dot"></span> On air</span>
|
||||||
|
<h2 data-np="title"><?= htmlspecialchars($station_name) ?></h2>
|
||||||
|
<p data-np="artist"><?= htmlspecialchars($station_slogan) ?></p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php
|
</section>
|
||||||
if($station->contentplayer == ""){
|
|
||||||
?>
|
|
||||||
<style>
|
|
||||||
.staticpage{
|
|
||||||
background: linear-gradient(45deg, #3849a8, #f7b835);
|
|
||||||
padding: 22px 35px 10px 35px;
|
|
||||||
display: block;
|
|
||||||
z-index: 1;
|
|
||||||
height: calc(100vh - 393px);
|
|
||||||
color: white;
|
|
||||||
text-align: center;
|
|
||||||
width: 100%;
|
|
||||||
max-width: 750px;
|
|
||||||
}
|
|
||||||
.staticpage > .logo{
|
|
||||||
width: 200px;
|
|
||||||
border-radius: 15px;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
.staticpage > p{
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
.staticpage > p.titleRadio{
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<div class="staticpage">
|
|
||||||
<img src="<?php echo $station->logo; ?>" class="logo" alt="logo radio">
|
|
||||||
<p class="titleRadio"><?php echo $station->name; ?></p>
|
|
||||||
<p class="subtitleRadio"><?php echo $station->slogan; ?></p>
|
|
||||||
</div>
|
|
||||||
<?php
|
|
||||||
}else{
|
|
||||||
?>
|
|
||||||
<iframe src="<?=$station_contentplayer?>" class="contentplayer" frameborder="0"></iframe>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div class="footer_player">
|
|
||||||
<div class="row align-items-center">
|
|
||||||
<div class="col-2" style="width: 70px;">
|
|
||||||
<img id="albumsong" src="<?php echo $station->logo; ?>" alt="<?php echo $station->name; ?>" style="width: 60px;height: 60px;">
|
|
||||||
</div>
|
|
||||||
<div class="col">
|
|
||||||
<div id="songs" style="font-weight: 700; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;"><?php echo $station->name; ?></div>
|
|
||||||
<div id="artist" style="text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical ;overflow: hidden;"><?php echo $station->slogan; ?></div>
|
|
||||||
</div>
|
|
||||||
<div class="col-auto" style="text-align: center; margin-top: 1px; padding-right: 0;">
|
|
||||||
<button id="formatToggleBtn" title="Cambia formato audio">
|
|
||||||
<span id="formatLabel" style="font-size: 12px;font-weight: 600;border-radius: 6px;border: 2px solid #ffffff;padding: 4px 6px;background: rgba(247, 184, 53, 0.3);color: #2a377e;">HLS</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="col-2" style="text-align: center; margin-top: 1px; margin-right: 5px; width: 67px;">
|
|
||||||
<button id="playPauseBtn"
|
|
||||||
data-stream-hls="<?php echo $station->streamhls; ?>"
|
|
||||||
data-stream-fallback="<?php echo $station->stream; ?>"
|
|
||||||
data-station-name="<?php echo htmlspecialchars($station->name); ?>"
|
|
||||||
data-station-logo="<?php echo $station->logo; ?>"
|
|
||||||
data-station-slogan="<?php echo htmlspecialchars($station->slogan); ?>"
|
|
||||||
data-api-url="<?php echo $station_apiradio; ?>">
|
|
||||||
<i class="material-icons play-icon" id="play-pause" style="font-size: 35px; border-radius: 10px; border: 2px solid #ffffff; padding: 4px 5px 4px 4px; margin-top: -2px; background: #f7b835; color: #2a377e;">play_arrow</i>
|
|
||||||
<i class="material-icons pause-icon" id="play-pause" style="display:none; font-size: 35px; border-radius: 10px; border: 2px solid #ffffff; padding: 4px 5px 4px 4px; margin-top: -2px; background: #f7b835; color: #2a377e;">pause</i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<audio id="hlsAudioPlayer" preload="none"></audio>
|
|
||||||
+29
-32
@@ -1,50 +1,47 @@
|
|||||||
<?php
|
<?php
|
||||||
// Assicurati che $station sia definito (dovrebbe essere passato da mobile.php)
|
// Vista di una web TV: barra con "torna a TV" e nome, poi il video (flusso HLS, js/app.js lo avvia).
|
||||||
if (!isset($station) || empty($station)) {
|
if (!isset($station) || empty($station)) {
|
||||||
echo '<div class="alert alert-danger">Errore: Stazione TV non trovata.</div>';
|
include './pages/page/404.php';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$station_id = (string)$station->id;
|
|
||||||
$station_name = (string)$station->name;
|
$station_name = (string)$station->name;
|
||||||
$station_logo = (string)$station->logo;
|
$station_logo = (string)$station->logo;
|
||||||
$station_stream = (string)$station->stream;
|
$station_stream = (string)$station->stream;
|
||||||
$station_poster = isset($station->poster) ? (string)$station->poster : '';
|
$station_poster = isset($station->poster) ? (string)$station->poster : '';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- Container player con sfondo bianco -->
|
<section class="tv-view fill-view" aria-label="<?= htmlspecialchars($station_name) ?>">
|
||||||
<div class="tv-player-container" style="background-color: #ffffff;height: calc(100% - <?php if($is_mobile){ echo "232px"; }else{ echo "217px"; } ?>);position: absolute;left: calc(50%);display: flex;flex-direction: column;max-width: 750px;transform: translateX(-50%);width: 100%;">
|
|
||||||
|
|
||||||
<!-- Header semplice con pulsante indietro e nome -->
|
<div class="view-bar">
|
||||||
<div class="tv-header" style="padding: 20px; border-bottom: 1px solid #eee; display: flex; align-items: center; justify-content: space-between;">
|
<?= rpi_back_pill('tv', 'TV') ?>
|
||||||
<div class="left-controls" style="display: flex; align-items: center;">
|
<div class="view-title">
|
||||||
<a href="<?php echo $base_path; ?>/tv" data-page="tv" class="linkBox" style="color: #333; display: flex; align-items: center; text-decoration: none;">
|
<strong><?= htmlspecialchars($station_name) ?></strong>
|
||||||
<span class="material-icons" style="font-size: 28px;">arrow_back</span>
|
<span>Web TV in diretta</span>
|
||||||
</a>
|
</div>
|
||||||
<span style="font-size: 18px; font-weight: 600; color: #333; margin-left: 15px;"><?php echo $station_name; ?></span>
|
<span class="chip chip-live"><span class="live-dot"></span> Live</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php if(!empty($station_logo)): ?>
|
<div class="tv-stage">
|
||||||
<div class="right-controls">
|
<div class="tv-player">
|
||||||
<img src="<?php echo $station_logo; ?>" alt="Logo" style="height: 30px; width: auto;">
|
<video id="tvVideoPlayer"
|
||||||
|
controls
|
||||||
|
playsinline
|
||||||
|
preload="none"
|
||||||
|
data-src="<?= htmlspecialchars($station_stream) ?>"
|
||||||
|
<?php if ($station_poster !== ''): ?>poster="<?= htmlspecialchars($station_poster) ?>"<?php endif; ?>
|
||||||
|
aria-label="Video di <?= htmlspecialchars($station_name) ?>"></video>
|
||||||
|
<p class="tv-error" role="status" hidden></p>
|
||||||
|
</div>
|
||||||
|
<?php if ($station_logo !== ''): ?>
|
||||||
|
<div class="tv-caption">
|
||||||
|
<img src="<?= htmlspecialchars($station_logo) ?>" alt="" width="40" height="40">
|
||||||
|
<div>
|
||||||
|
<strong><?= htmlspecialchars($station_name) ?></strong>
|
||||||
|
<span>La diretta video del canale. Mentre guardi la TV la radio si mette in pausa.</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Area Video -->
|
</section>
|
||||||
<div class="video-wrapper" style="flex: 1; display: flex; align-items: center; justify-content: center; background-color: #000;">
|
|
||||||
<video id="tvVideoPlayer"
|
|
||||||
class="video-js"
|
|
||||||
controls
|
|
||||||
playsinline
|
|
||||||
data-src="<?php echo $station_stream; ?>"
|
|
||||||
poster="<?php echo $station_poster; ?>"
|
|
||||||
style="width: 100%; max-width: 100%; max-height: 100vh; aspect-ratio: 16/9;">
|
|
||||||
<p class="vjs-no-js">
|
|
||||||
To view this video please enable JavaScript, and consider upgrading to a web browser that
|
|
||||||
<a href="https://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a>
|
|
||||||
</p>
|
|
||||||
</video>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
+99
-167
@@ -1,206 +1,138 @@
|
|||||||
<?php
|
<?php
|
||||||
header('Content-Type: text/html; charset=UTF-8');
|
|
||||||
|
|
||||||
// Feeds configuration
|
// Feed RSS dei podcast delle radio del gruppo. Il <link> di ogni puntata è la pagina per l'app (contentrpigplay),
|
||||||
|
// che viene mostrata in un iframe. Le copertine arrivano da <itunes:image>.
|
||||||
$feeds = [
|
$feeds = [
|
||||||
['url' => "https://www.radiodiffusionelibera.com/podcast/feed/", 'source' => 'RDL'],
|
['url' => "https://www.radiodiffusionelibera.com/podcast/feed/", 'source' => 'RDL', 'class' => 'source-rdl'],
|
||||||
['url' => "https://www.radiocitta105.it/podcast/feed/", 'source' => 'Radio Città 105']
|
['url' => "https://www.radiocitta105.it/podcast/feed/", 'source' => 'Radio Città 105', 'class' => 'source-rc105'],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Scarica un feed con un tempo massimo di attesa (un sito lento non deve bloccare la pagina) e lo tiene in una
|
||||||
|
* cache su file per 5 minuti: la pagina Podcast si apre spesso e i feed cambiano di rado.
|
||||||
|
*/
|
||||||
|
function rpi_load_feed(string $url)
|
||||||
|
{
|
||||||
|
$cache_file = sys_get_temp_dir() . '/rpigroupplay-feed-' . md5($url) . '.xml';
|
||||||
|
$cache_ttl = 300;
|
||||||
|
|
||||||
|
if (is_file($cache_file) && (time() - filemtime($cache_file)) < $cache_ttl) {
|
||||||
|
$xml = @simplexml_load_file($cache_file);
|
||||||
|
if ($xml !== false) return $xml;
|
||||||
|
}
|
||||||
|
|
||||||
|
$ctx = stream_context_create(['http' => ['timeout' => 6, 'user_agent' => 'RPIGroupPlay/' . ($GLOBALS['version_app'] ?? '1.0')]]);
|
||||||
|
$raw = @file_get_contents($url, false, $ctx);
|
||||||
|
if ($raw === false || $raw === '') {
|
||||||
|
// Rete assente: si usa la copia vecchia, se c'è
|
||||||
|
return is_file($cache_file) ? @simplexml_load_file($cache_file) : false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$xml = @simplexml_load_string($raw);
|
||||||
|
if ($xml !== false) @file_put_contents($cache_file, $raw, LOCK_EX);
|
||||||
|
return $xml;
|
||||||
|
}
|
||||||
|
|
||||||
$all_items = [];
|
$all_items = [];
|
||||||
foreach ($feeds as $feed) {
|
foreach ($feeds as $feed) {
|
||||||
// Caricamento feed con soppressione errori per non bloccare l'intera lista
|
$rss = rpi_load_feed($feed['url']);
|
||||||
$rss = @simplexml_load_file($feed['url']);
|
|
||||||
if ($rss && isset($rss->channel->item)) {
|
if ($rss && isset($rss->channel->item)) {
|
||||||
foreach ($rss->channel->item as $item) {
|
foreach ($rss->channel->item as $item) {
|
||||||
|
$itunes = $item->children('itunes', true);
|
||||||
|
$image = '';
|
||||||
|
if (isset($itunes->image)) {
|
||||||
|
$image = (string)$itunes->image->attributes()->href;
|
||||||
|
}
|
||||||
$all_items[] = [
|
$all_items[] = [
|
||||||
'title' => (string)$item->title,
|
'title' => (string)$item->title,
|
||||||
'link' => (string)$item->link,
|
'link' => (string)$item->link,
|
||||||
'pubDate' => (string)$item->pubDate,
|
'pubDate' => (string)$item->pubDate,
|
||||||
'timestamp' => strtotime((string)$item->pubDate),
|
'timestamp' => strtotime((string)$item->pubDate) ?: 0,
|
||||||
'source' => $feed['source']
|
'program' => (string)$item->category,
|
||||||
|
'image' => $image,
|
||||||
|
'source' => $feed['source'],
|
||||||
|
'class' => $feed['class'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ordinamento cronologico decrescente (i più recenti in alto)
|
// Dalla più recente
|
||||||
usort($all_items, function ($a, $b) {
|
usort($all_items, function ($a, $b) {
|
||||||
return $b['timestamp'] - $a['timestamp'];
|
return $b['timestamp'] - $a['timestamp'];
|
||||||
});
|
});
|
||||||
|
|
||||||
function formatDateItalian($dateString) {
|
function rpi_date_it(int $timestamp): string
|
||||||
try {
|
{
|
||||||
$date = new DateTime($dateString);
|
static $months = ['', 'gennaio', 'febbraio', 'marzo', 'aprile', 'maggio', 'giugno', 'luglio', 'agosto', 'settembre', 'ottobre', 'novembre', 'dicembre'];
|
||||||
$months = [
|
if ($timestamp <= 0) return '';
|
||||||
'January' => 'Gennaio', 'February' => 'Febbraio', 'March' => 'Marzo',
|
return date('j', $timestamp) . ' ' . $months[(int)date('n', $timestamp)] . ' ' . date('Y', $timestamp);
|
||||||
'April' => 'Aprile', 'May' => 'Maggio', 'June' => 'Giugno',
|
|
||||||
'July' => 'Luglio', 'August' => 'Agosto', 'September' => 'Settembre',
|
|
||||||
'October' => 'Ottobre', 'November' => 'Novembre', 'December' => 'Dicembre'
|
|
||||||
];
|
|
||||||
$formatted = $date->format('j F Y');
|
|
||||||
return strtr($formatted, $months);
|
|
||||||
} catch (Exception $e) {
|
|
||||||
return $dateString;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<style>
|
<div class="podcast-page" id="podcast-page">
|
||||||
.podcast-container {
|
|
||||||
position: relative;
|
|
||||||
padding-bottom: 20px;
|
|
||||||
}
|
|
||||||
.podcast-item {
|
|
||||||
background: #ffffff;
|
|
||||||
border-left: 5px solid #2a377e;
|
|
||||||
border-radius: 12px;
|
|
||||||
padding: 16px;
|
|
||||||
margin-bottom: 15px;
|
|
||||||
transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
|
|
||||||
cursor: pointer;
|
|
||||||
box-shadow: 0 4px 12px rgba(0,0,0,0.08);
|
|
||||||
border-top: 1px solid #f0f0f0;
|
|
||||||
border-right: 1px solid #f0f0f0;
|
|
||||||
border-bottom: 1px solid #f0f0f0;
|
|
||||||
}
|
|
||||||
.podcast-item:hover {
|
|
||||||
/*transform: translateY(-4px);*/
|
|
||||||
/*box-shadow: 0 12px 20px rgba(42, 55, 126, 0.15);*/
|
|
||||||
background: #f8faff;
|
|
||||||
}
|
|
||||||
.podcast-source {
|
|
||||||
display: inline-block;
|
|
||||||
padding: 2px 10px;
|
|
||||||
border-radius: 50px;
|
|
||||||
font-size: 0.7rem;
|
|
||||||
font-weight: 800;
|
|
||||||
margin-bottom: 8px;
|
|
||||||
text-transform: uppercase;
|
|
||||||
letter-spacing: 0.5px;
|
|
||||||
}
|
|
||||||
.source-rdl {
|
|
||||||
background: #eef1ff;
|
|
||||||
color: #2a377e;
|
|
||||||
border: 1px solid #2a377e30;
|
|
||||||
}
|
|
||||||
.source-rc105 {
|
|
||||||
background: #fff4e5;
|
|
||||||
color: #e65100;
|
|
||||||
border: 1px solid #e6510030;
|
|
||||||
}
|
|
||||||
.podcast-title {
|
|
||||||
font-weight: 700;
|
|
||||||
color: #333;
|
|
||||||
font-size: 1.05rem;
|
|
||||||
line-height: 1.4;
|
|
||||||
margin-bottom: 8px;
|
|
||||||
}
|
|
||||||
.podcast-date {
|
|
||||||
font-size: 0.8rem;
|
|
||||||
color: #777;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
text-transform: uppercase;
|
|
||||||
letter-spacing: 0.5px;
|
|
||||||
}
|
|
||||||
.podcast-date .material-icons {
|
|
||||||
font-size: 14px;
|
|
||||||
margin-right: 6px;
|
|
||||||
color: #f7b835;
|
|
||||||
}
|
|
||||||
#podcast-detail {
|
|
||||||
display: none;
|
|
||||||
animation: slideIn 0s ease-out;
|
|
||||||
position: fixed;
|
|
||||||
background: #ffffff;
|
|
||||||
top: 154px;
|
|
||||||
max-width: 750px;
|
|
||||||
min-width: 330px;
|
|
||||||
width: 100%;
|
|
||||||
left: calc(50% + 1px);
|
|
||||||
transform: translateX(calc(-50% - 1px));
|
|
||||||
}
|
|
||||||
@keyframes slideIn {
|
|
||||||
from { opacity: 0; transform: translateX(0); }
|
|
||||||
to { opacity: 1; transform: translateX(0); }
|
|
||||||
}
|
|
||||||
.podcast-header-nav {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
padding: 10px 0 20px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
.podcast-iframe {
|
|
||||||
width: 100%;
|
|
||||||
height: calc(100vh - 290px);
|
|
||||||
border: none;
|
|
||||||
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
|
|
||||||
background: #f9f9f9;
|
|
||||||
}
|
|
||||||
.error-msg {
|
|
||||||
text-align: center;
|
|
||||||
padding: 40px 20px;
|
|
||||||
color: #666;
|
|
||||||
}
|
|
||||||
.error-msg i {
|
|
||||||
font-size: 48px;
|
|
||||||
color: #ccc;
|
|
||||||
margin-bottom: 15px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<div class="radio-header" id="podcast-header" style="padding: 20px; margin: 0 0 20px 0; border-bottom: 1px solid #eee; display: flex; align-items: center; justify-content: space-between;position: sticky;top: 0px;z-index: 1;background: white;">
|
<!-- Elenco delle puntate -->
|
||||||
<div class="left-controls" style="display: flex; align-items: center;">
|
<div id="podcast-list" class="podcast-list">
|
||||||
<a href="<?php echo $base_path; ?>/home" data-page="home" class="linkBox" style="color: #333; display: flex; align-items: center; text-decoration: none;">
|
<?php rpi_page_header([
|
||||||
<span class="material-icons" style="font-size: 28px;">arrow_back</span>
|
'eyebrow' => 'Podcast',
|
||||||
</a>
|
'title' => 'Riascolta le dirette',
|
||||||
<span style="font-size: 18px; font-weight: 600; color: #333; margin-left: 15px;">Podcast</span>
|
'subtitle' => 'Le puntate dei programmi delle radio del gruppo, dalla più recente.',
|
||||||
</div>
|
'back' => ['page' => 'home', 'label' => 'Home'],
|
||||||
</div>
|
]); ?>
|
||||||
|
|
||||||
<div class="tec px-4">
|
<div class="page">
|
||||||
<div id="podcast-container" class="podcast-container">
|
<div class="container">
|
||||||
|
|
||||||
<!-- Podcast List -->
|
|
||||||
<div id="podcast-list">
|
|
||||||
<?php if (!empty($all_items)): ?>
|
<?php if (!empty($all_items)): ?>
|
||||||
<?php foreach ($all_items as $item): ?>
|
<div class="podcast-grid">
|
||||||
<div class="podcast-item" onclick="openPodcast('<?php echo addslashes($item['link']); ?>', '<?php echo addslashes($item['title']); ?>')">
|
<?php foreach ($all_items as $i => $item): ?>
|
||||||
<div class="podcast-source <?php echo $item['source'] === 'RDL' ? 'source-rdl' : 'source-rc105'; ?>">
|
<article class="card card-link podcast-card" role="button" tabindex="0"
|
||||||
<?php echo $item['source']; ?>
|
data-podcast-url="<?= htmlspecialchars($item['link']) ?>"
|
||||||
</div>
|
data-podcast-title="<?= htmlspecialchars($item['title']) ?>"
|
||||||
<div class="podcast-title"><?php echo $item['title']; ?></div>
|
data-podcast-source="<?= htmlspecialchars($item['source']) ?>">
|
||||||
<div class="podcast-date">
|
<div class="cover">
|
||||||
<span class="material-icons">calendar_today</span>
|
<?php if ($item['image'] !== ''): ?>
|
||||||
<?php echo formatDateItalian($item['pubDate']); ?>
|
<img src="<?= htmlspecialchars($item['image']) ?>" alt="" loading="<?= $i < 3 ? 'eager' : 'lazy' ?>" decoding="async">
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<div class="error-msg">
|
<span class="cover-fallback"><?= rpi_icon('mic', 36) ?></span>
|
||||||
<span class="material-icons">rss_feed</span>
|
<?php endif; ?>
|
||||||
|
<span class="play" aria-hidden="true"><?= rpi_icon('play', 20) ?></span>
|
||||||
|
</div>
|
||||||
|
<div class="body">
|
||||||
|
<div class="chips">
|
||||||
|
<span class="chip <?= $item['class'] ?>"><?= htmlspecialchars($item['source']) ?></span>
|
||||||
|
<?php if ($item['program'] !== ''): ?><span class="chip chip-brand"><?= htmlspecialchars($item['program']) ?></span><?php endif; ?>
|
||||||
|
</div>
|
||||||
|
<h3><?= htmlspecialchars($item['title']) ?></h3>
|
||||||
|
<time datetime="<?= $item['timestamp'] ? date('Y-m-d', $item['timestamp']) : '' ?>">
|
||||||
|
<?= rpi_icon('calendar', 14) ?> <?= rpi_date_it($item['timestamp']) ?>
|
||||||
|
</time>
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</div>
|
||||||
|
<?php else: ?>
|
||||||
|
<div class="empty-state">
|
||||||
|
<?= rpi_icon('rss', 40) ?>
|
||||||
<p>Impossibile caricare i podcast al momento. Riprova più tardi.</p>
|
<p>Impossibile caricare i podcast al momento. Riprova più tardi.</p>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Podcast Detail (Iframe) -->
|
|
||||||
<div id="podcast-detail">
|
|
||||||
<div class="radio-header" style="padding: 20px; border-bottom: 1px solid #eee; display: flex; align-items: center; justify-content: space-between;position: relative;background: white; z-index: 5;">
|
|
||||||
<div class="left-controls" style="display: flex; align-items: center;">
|
|
||||||
<div class="back-to-list" onclick="closePodcast()" class="linkBox" style="color: #333; display: flex; align-items: center; text-decoration: none; cursor: pointer;">
|
|
||||||
<span class="material-icons" style="font-size: 28px;">arrow_back</span>
|
|
||||||
</div>
|
|
||||||
<span style="font-size: 18px; font-weight: 600; color: #333; margin-left: 15px;">Torna ai podcast</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<iframe id="podcast-iframe" class="podcast-iframe" src="about:blank"></iframe>
|
<!-- Puntata aperta (pagina del sito per l'app, in un iframe) -->
|
||||||
|
<div id="podcast-detail" class="podcast-detail" hidden>
|
||||||
|
<div class="view-bar">
|
||||||
|
<button type="button" class="back-pill" data-podcast-close>
|
||||||
|
<?= rpi_icon('arrow-left', 18) ?> Podcast
|
||||||
|
</button>
|
||||||
|
<div class="view-title">
|
||||||
|
<strong id="podcast-detail-title"></strong>
|
||||||
|
<span id="podcast-detail-source"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<iframe id="podcast-iframe" class="contentplayer" src="about:blank" title="Puntata del podcast" allow="autoplay"></iframe>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,15 +1,16 @@
|
|||||||
<?php header('Content-Type: text/html; charset=UTF-8'); ?>
|
<?php
|
||||||
|
|
||||||
<div class="radio-header" style="padding: 20px; margin: 0 0 20px 0; border-bottom: 1px solid #eee; display: flex; align-items: center; justify-content: space-between;position: sticky;top: 0px;background: white; z-index: 1;">
|
rpi_page_header([
|
||||||
<div class="left-controls" style="display: flex; align-items: center;">
|
'eyebrow' => 'Informativa',
|
||||||
<a href="<?php echo $base_path; ?>/home" data-page="home" class="linkBox" style="color: #333; display: flex; align-items: center; text-decoration: none;">
|
'title' => 'Policy Privacy',
|
||||||
<span class="material-icons" style="font-size: 28px;">arrow_back</span>
|
'subtitle' => "Come trattiamo i dati personali di chi usa l'app.",
|
||||||
</a>
|
]);
|
||||||
<span style="font-size: 18px; font-weight: 600; color: #333; margin-left: 15px;">Policy Privacy</span>
|
?>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="tec px-4">
|
<div class="page">
|
||||||
|
<div class="container narrow">
|
||||||
|
<article class="card prose-card">
|
||||||
|
<div class="prose">
|
||||||
<p>Ultimo aggiornamento: 17/11/2025</p>
|
<p>Ultimo aggiornamento: 17/11/2025</p>
|
||||||
<hr>
|
<hr>
|
||||||
<p><b>Titolare del Trattamento</b><br>Il Titolare del trattamento dei dati personali è A.S.V. Studios APPS, con sede legale in Italia, contattabile all’indirizzo e-mail <a href="mailto:pp.app@rpigroup.net">pp.app@rpigroup.net</a>. Per ulteriori informazioni o per esercitare i diritti previsti dalla normativa sulla protezione dei dati personali, è possibile inviare una richiesta scritta all’indirizzo sopra indicato.</p>
|
<p><b>Titolare del Trattamento</b><br>Il Titolare del trattamento dei dati personali è A.S.V. Studios APPS, con sede legale in Italia, contattabile all’indirizzo e-mail <a href="mailto:pp.app@rpigroup.net">pp.app@rpigroup.net</a>. Per ulteriori informazioni o per esercitare i diritti previsti dalla normativa sulla protezione dei dati personali, è possibile inviare una richiesta scritta all’indirizzo sopra indicato.</p>
|
||||||
@@ -58,3 +59,6 @@
|
|||||||
</p>
|
</p>
|
||||||
<p><b>Modifiche a questa Informativa</b><br>La presente informativa può essere soggetta a modifiche e aggiornamenti. La versione più recente sarà sempre disponibile all’interno del Servizio. Gli utenti saranno informati delle modifiche rilevanti tramite una notifica all’interno del Servizio, così da garantire massima trasparenza e permettere a tutti di essere sempre aggiornati.</p>
|
<p><b>Modifiche a questa Informativa</b><br>La presente informativa può essere soggetta a modifiche e aggiornamenti. La versione più recente sarà sempre disponibile all’interno del Servizio. Gli utenti saranno informati delle modifiche rilevanti tramite una notifica all’interno del Servizio, così da garantire massima trasparenza e permettere a tutti di essere sempre aggiornati.</p>
|
||||||
</div>
|
</div>
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
+30
-21
@@ -1,29 +1,38 @@
|
|||||||
<?php header('Content-Type: text/html; charset=UTF-8'); ?>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
// views/home.php - Vista della pagina principale
|
|
||||||
$stations = loadRadioStations();
|
$stations = loadRadioStations();
|
||||||
|
|
||||||
|
rpi_page_header([
|
||||||
|
'eyebrow' => 'Radio',
|
||||||
|
'title' => 'Le radio del gruppo',
|
||||||
|
'subtitle' => 'Scegli l\'emittente: la diretta parte subito e continua mentre navighi nell\'app.',
|
||||||
|
'back' => ['page' => 'home', 'label' => 'Home'],
|
||||||
|
]);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="radio-header" style="padding: 20px; margin: 0 0 20px 0; border-bottom: 1px solid #eee; display: flex; align-items: center; justify-content: space-between;position: sticky;top: 0px;background: white;">
|
<div class="page">
|
||||||
<div class="left-controls" style="display: flex; align-items: center;">
|
<div class="container">
|
||||||
<a href="<?php echo $base_path; ?>/home" data-page="home" class="linkBox" style="color: #333; display: flex; align-items: center; text-decoration: none;">
|
<?php if (count($stations) > 0): ?>
|
||||||
<span class="material-icons" style="font-size: 28px;">arrow_back</span>
|
<div class="station-grid">
|
||||||
|
<?php foreach ($stations as $st): ?>
|
||||||
|
<a href="<?= rpi_link('play/' . $st->id) ?>" data-page="play/<?= $st->id ?>" class="card card-link station-card">
|
||||||
|
<span class="cover">
|
||||||
|
<img src="<?= htmlspecialchars($st->logo) ?>" alt="" loading="lazy" decoding="async">
|
||||||
|
<span class="play" aria-hidden="true"><?= rpi_icon('play', 18) ?></span>
|
||||||
|
<?php if ((string)$st->thematic === 'true'): ?><span class="chip chip-accent thematic">Tematica</span><?php endif; ?>
|
||||||
|
</span>
|
||||||
|
<span class="body">
|
||||||
|
<h3><?= htmlspecialchars($st->name) ?></h3>
|
||||||
|
<p><?= htmlspecialchars($st->slogan) ?></p>
|
||||||
|
</span>
|
||||||
</a>
|
</a>
|
||||||
<span style="font-size: 18px; font-weight: 600; color: #333; margin-left: 15px;">Radio</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="stationList px-4">
|
|
||||||
<div class="row g-2">
|
|
||||||
<?php foreach ($stations as $station): ?>
|
|
||||||
<div class="col-6">
|
|
||||||
<div class="stationCard <?php if((string)$station->thematic === 'true'){echo "isthematic";} ?>" data-id="<?php echo $station->id; ?>">
|
|
||||||
<a href="<?php echo $base_path; ?>/play/<?php echo $station->id; ?>" data-page="play/<?php echo $station->id; ?>" class="nav-link stationLink">
|
|
||||||
<img src="<?php echo $station->logo; ?>" alt="<?php echo $station->name; ?>" class="stationLogo">
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</div>
|
</div>
|
||||||
|
<?php else: ?>
|
||||||
|
<div class="empty-state">
|
||||||
|
<?= rpi_icon('radio', 40) ?>
|
||||||
|
<p>Nessuna radio disponibile al momento.</p>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1,15 +1,16 @@
|
|||||||
<?php header('Content-Type: text/html; charset=UTF-8'); ?>
|
<?php
|
||||||
|
|
||||||
<div class="radio-header" style="padding: 20px; margin: 0 0 20px 0; border-bottom: 1px solid #eee; display: flex; align-items: center; justify-content: space-between;position: sticky;top: 0px;background: white; z-index: 1;">
|
rpi_page_header([
|
||||||
<div class="left-controls" style="display: flex; align-items: center;">
|
'eyebrow' => 'Informativa',
|
||||||
<a href="<?php echo $base_path; ?>/home" data-page="home" class="linkBox" style="color: #333; display: flex; align-items: center; text-decoration: none;">
|
'title' => 'Termini e Condizioni',
|
||||||
<span class="material-icons" style="font-size: 28px;">arrow_back</span>
|
'subtitle' => "Le regole d'uso di RPIGroup Play.",
|
||||||
</a>
|
]);
|
||||||
<span style="font-size: 18px; font-weight: 600; color: #333; margin-left: 15px;">Termini e Condizioni</span>
|
?>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="tec px-4">
|
<div class="page">
|
||||||
|
<div class="container narrow">
|
||||||
|
<article class="card prose-card">
|
||||||
|
<div class="prose">
|
||||||
<p>Ultimo aggiornamento: 17/11/2025</p>
|
<p>Ultimo aggiornamento: 17/11/2025</p>
|
||||||
<hr>
|
<hr>
|
||||||
<p><b>Introduzione</b><br> RPIGroup Play vi dà il benvenuto. I presenti Termini e Condizioni (di seguito “T&C”) regolamentano l’accesso e l’uso dell’applicazione “RPIGroup Play” (di seguito “Portale”, “Servizio”, “Applicazione” e “Sito”) e tutti i servizi correlati. Accedendo e utilizzando il Portale, l’utente (di seguito “Utente”) accetta i presenti T&C al primo accesso, condizione necessaria per poter utilizzare il Servizio. L’utente potrà in qualsiasi momento declinare i seguenti T&C, sapendo che non potrà più accedere all’Applicazione offerta.</p>
|
<p><b>Introduzione</b><br> RPIGroup Play vi dà il benvenuto. I presenti Termini e Condizioni (di seguito “T&C”) regolamentano l’accesso e l’uso dell’applicazione “RPIGroup Play” (di seguito “Portale”, “Servizio”, “Applicazione” e “Sito”) e tutti i servizi correlati. Accedendo e utilizzando il Portale, l’utente (di seguito “Utente”) accetta i presenti T&C al primo accesso, condizione necessaria per poter utilizzare il Servizio. L’utente potrà in qualsiasi momento declinare i seguenti T&C, sapendo che non potrà più accedere all’Applicazione offerta.</p>
|
||||||
@@ -35,3 +36,6 @@
|
|||||||
<p><b>Leggi Applicabile e Foro di Competente</b><br>Questi Termini e Condizioni sono regolati dalla legge italiana. In caso di controversie riguardanti l’interpretazione o l’applicazione dei Termini e Condizioni, la competenza sarà attribuita esclusivamente al Tribunale di Milano, salvo diversa indicazione prevista dalla legge per l’Utente, come nei casi in cui la normativa vigente, ad esempio il Codice del Consumo, preveda il foro di residenza o domicilio del consumatore.</p>
|
<p><b>Leggi Applicabile e Foro di Competente</b><br>Questi Termini e Condizioni sono regolati dalla legge italiana. In caso di controversie riguardanti l’interpretazione o l’applicazione dei Termini e Condizioni, la competenza sarà attribuita esclusivamente al Tribunale di Milano, salvo diversa indicazione prevista dalla legge per l’Utente, come nei casi in cui la normativa vigente, ad esempio il Codice del Consumo, preveda il foro di residenza o domicilio del consumatore.</p>
|
||||||
<p><b>Accettazione dei Termini e Condizioni</b><br>L'Utente accetta automaticamente i seguenti termini e condizioni tramite l'accesso all'interno dell'Applicazione.</p>
|
<p><b>Accettazione dei Termini e Condizioni</b><br>L'Utente accetta automaticamente i seguenti termini e condizioni tramite l'accesso all'interno dell'Applicazione.</p>
|
||||||
</div>
|
</div>
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
+31
-22
@@ -1,29 +1,38 @@
|
|||||||
<?php header('Content-Type: text/html; charset=UTF-8'); ?>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
// views/home.php - Vista della pagina principale
|
|
||||||
$stations = loadTvStations();
|
$stations = loadTVStations();
|
||||||
|
|
||||||
|
rpi_page_header([
|
||||||
|
'eyebrow' => 'Web TV',
|
||||||
|
'title' => 'I canali del gruppo',
|
||||||
|
'subtitle' => 'Le dirette video delle emittenti RPIGroup.',
|
||||||
|
'back' => ['page' => 'home', 'label' => 'Home'],
|
||||||
|
]);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="radio-header" style="padding: 20px; margin: 0 0 20px 0; border-bottom: 1px solid #eee; display: flex; align-items: center; justify-content: space-between;position: sticky;top: 0px;background: white;">
|
<div class="page">
|
||||||
<div class="left-controls" style="display: flex; align-items: center;">
|
<div class="container">
|
||||||
<a href="<?php echo $base_path; ?>/home" data-page="home" class="linkBox" style="color: #333; display: flex; align-items: center; text-decoration: none;">
|
<?php if (count($stations) > 0): ?>
|
||||||
<span class="material-icons" style="font-size: 28px;">arrow_back</span>
|
<div class="station-grid tv-grid">
|
||||||
|
<?php foreach ($stations as $st): ?>
|
||||||
|
<a href="<?= rpi_link('playtv/' . $st->id) ?>" data-page="playtv/<?= $st->id ?>" class="card card-link station-card is-tv">
|
||||||
|
<span class="cover">
|
||||||
|
<img src="<?= htmlspecialchars(!empty($st->poster) ? $st->poster : $st->logo) ?>" alt="" loading="lazy" decoding="async">
|
||||||
|
<span class="play" aria-hidden="true"><?= rpi_icon('play', 18) ?></span>
|
||||||
|
<span class="chip chip-live tv-chip"><span class="live-dot"></span> Live</span>
|
||||||
|
</span>
|
||||||
|
<span class="body">
|
||||||
|
<h3><?= htmlspecialchars($st->name) ?></h3>
|
||||||
|
<p>Web TV in streaming</p>
|
||||||
|
</span>
|
||||||
</a>
|
</a>
|
||||||
<span style="font-size: 18px; font-weight: 600; color: #333; margin-left: 15px;">TV</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="stationList px-4">
|
|
||||||
<div class="row g-2">
|
|
||||||
<?php foreach ($stations as $station): ?>
|
|
||||||
<div class="col-6">
|
|
||||||
<div class="stationCard <?php if((string)$station->thematic === 'true'){echo "isthematic";} ?>" data-id="<?php echo $station->id; ?>">
|
|
||||||
<a href="<?php echo $base_path; ?>/playtv/<?php echo $station->id; ?>" data-page="playtv/<?php echo $station->id; ?>" class="nav-link stationLink">
|
|
||||||
<img src="<?php echo $station->logo; ?>" alt="<?php echo $station->name; ?>" class="stationLogo">
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</div>
|
</div>
|
||||||
|
<?php else: ?>
|
||||||
|
<div class="empty-state">
|
||||||
|
<?= rpi_icon('tv', 40) ?>
|
||||||
|
<p>Nessun canale TV disponibile al momento.</p>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1,6 +1,33 @@
|
|||||||
# RPIGroup Play
|
# RPIGroup Play
|
||||||
Il player ufficiale del gruppo RPIGroup
|
Il player ufficiale del gruppo RPIGroup: radio, web TV e podcast in un'unica web app, su telefono e computer.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
Questa repository è connessa al dominio APP.RPIGROUP.IT, ed è modificabile solo dagli utenti autorizzati
|
Questa repository è connessa al dominio APP.RPIGROUP.IT, ed è modificabile solo dagli utenti autorizzati
|
||||||
|
|
||||||
|
## Com'è fatta
|
||||||
|
|
||||||
|
- `index.php` carica la configurazione, il `<head>` e il guscio dell'app (`pages/app.php`): sidebar da 900px in su,
|
||||||
|
topbar e tab bar su telefono, dock del player in basso.
|
||||||
|
- Le pagine stanno in `pages/page/*.php`. Al primo accesso vengono incluse nel guscio; poi `js/app.js` le carica via
|
||||||
|
AJAX (`index.php/<pagina>` con l'intestazione `X-Requested-With`) senza ricaricare l'app, così la radio continua.
|
||||||
|
- `config/ui.inc.php` ha i pezzi di interfaccia condivisi: icone SVG inline (`rpi_icon`), intestazione delle pagine
|
||||||
|
(`rpi_page_header`), motivo grafico, link.
|
||||||
|
- `css/style.css` è il sistema di design, preso dal tema RPIGroup Radio Theme dei siti del gruppo: i due colori del
|
||||||
|
marchio (`--brand`, `--accent`) generano la palette con `color-mix()`; caratteri Bricolage Grotesque e Plus Jakarta
|
||||||
|
Sans ospitati in `css/fonts`.
|
||||||
|
- Radio e TV sono in `data/radio.xml` e `data/tv.xml`; la versione dell'app è la prima voce di `data/changelog.xml`
|
||||||
|
(serve anche a svuotare la cache di CSS e JS).
|
||||||
|
- `js/app.js`: router, player della radio (hls.js o HLS nativo con riserva MP3/AAC, brano in onda, Media Session),
|
||||||
|
TV, podcast (puntata in iframe), avviso offline. `js/pwa-install.js`: service worker e invito a installare l'app.
|
||||||
|
|
||||||
|
## Sviluppo in locale
|
||||||
|
|
||||||
|
Con PHP 8 e un router che imiti `.htaccess` (tutto a `index.php`, statici serviti così come sono):
|
||||||
|
|
||||||
|
```sh
|
||||||
|
php -S 127.0.0.1:8089 -t . router.php
|
||||||
|
```
|
||||||
|
|
||||||
|
Le pagine `contentrpigplay` delle radio accettano di essere incorporate solo da `rpigroup.net` e `rpigroup.it`:
|
||||||
|
in locale l'iframe resta vuoto, è normale.
|
||||||
+2
-3
@@ -1,5 +1,4 @@
|
|||||||
|
<script src="<?php echo $base_path; ?>/js/pwa-install.js?v=<?=$version_app?>"></script>
|
||||||
<script src="<?php echo $base_path; ?>/js/pwa-install.js?v=<?=time()?>"></script>
|
<script src="<?php echo $base_path; ?>/js/app.js?v=<?=$version_app?>"></script>
|
||||||
<script src="<?php echo $base_path; ?>/js/app.js?v=<?=time()?>"></script>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
+18
-41
@@ -10,64 +10,41 @@ header('Referrer-Policy: strict-origin-when-cross-origin');
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="it">
|
<html lang="it" data-theme="dark">
|
||||||
<head>
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
<title><?php echo $title_site; ?></title>
|
<title><?php echo $title_site; ?></title>
|
||||||
<meta name="description" content="<?php echo $description_site; ?>">
|
<meta name="description" content="<?php echo $description_site; ?>">
|
||||||
<meta name="application-name" content="<?php echo $title_site; ?>">
|
<meta name="application-name" content="<?php echo $title_site; ?>">
|
||||||
<link rel="icon" type="image/png" href="<?php echo $logo_site; ?>">
|
<!-- App, non sito: niente zoom con le dita, la pagina riempie anche le aree con la tacca (viewport-fit) -->
|
||||||
<meta charset="utf-8">
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover">
|
||||||
<meta name="msapplication-tap-highlight" content="no">
|
<meta name="msapplication-tap-highlight" content="no">
|
||||||
<meta name="HandheldFriendly" content="True">
|
<meta name="HandheldFriendly" content="True">
|
||||||
<meta name="MobileOptimized" content="320"/>
|
|
||||||
<meta name="viewport" content="minimal-ui, width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
|
||||||
<meta name="robots" content="index, follow">
|
<meta name="robots" content="index, follow">
|
||||||
<meta name="mobile-web-app-capable" content="yes">
|
<meta name="mobile-web-app-capable" content="yes">
|
||||||
<meta name="application-name" content="<?php echo $title_site; ?>">
|
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||||
<meta name="apple-mobile-web-app-title" content="<?php echo $title_site; ?>">
|
<meta name="apple-mobile-web-app-title" content="<?php echo $title_site; ?>">
|
||||||
<meta name="theme-color" content="#2a377e">
|
<meta name="theme-color" content="#1c2555">
|
||||||
|
<meta name="color-scheme" content="dark">
|
||||||
|
<link rel="icon" type="image/png" href="<?=$base_path?>/img/logoapp.png">
|
||||||
<link rel="apple-touch-icon" href="<?=$base_path?>/img/logoapp.png">
|
<link rel="apple-touch-icon" href="<?=$base_path?>/img/logoapp.png">
|
||||||
<link rel="apple-touch-icon" sizes="152x152" href="<?=$base_path?>/img/icons/icon-152x152.png">
|
<link rel="apple-touch-icon" sizes="152x152" href="<?=$base_path?>/img/icons/icon-152x152.png">
|
||||||
<link rel="apple-touch-icon" sizes="192x192" href="<?=$base_path?>/img/icons/icon-192x192.png">
|
<link rel="apple-touch-icon" sizes="192x192" href="<?=$base_path?>/img/icons/icon-192x192.png">
|
||||||
<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="manifest" href="<?=$base_path?>/manifest.json?v=<?=$version_app?>">
|
||||||
<link rel="stylesheet" href="<?=$base_path?>/css/bootstrap.css">
|
|
||||||
|
<!-- Caratteri del tema RPIGroup, ospitati dall'app (funzionano anche offline): Bricolage Grotesque per i titoli,
|
||||||
|
Plus Jakarta Sans per il testo. Partono subito, insieme all'HTML -->
|
||||||
|
<link rel="preload" href="<?=$base_path?>/css/fonts/plus-jakarta-sans-latin-wght-normal.woff2" as="font" type="font/woff2" crossorigin>
|
||||||
|
<link rel="preload" href="<?=$base_path?>/css/fonts/bricolage-grotesque-latin-wght-normal.woff2" as="font" type="font/woff2" crossorigin>
|
||||||
<link rel="stylesheet" href="<?=$base_path?>/css/style.css?v=<?=$version_app?>">
|
<link rel="stylesheet" href="<?=$base_path?>/css/style.css?v=<?=$version_app?>">
|
||||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
|
||||||
<link rel="stylesheet" href="<?=$base_path?>/css/animation.css?v=<?=$version_app?>">
|
<!-- hls.js (flussi HLS di radio e TV su Chrome, Firefox, Edge; Safari li legge da solo). Versione 1.x fissata -->
|
||||||
<script src="https://code.jquery.com/jquery-2.2.4.js?v=<?=$version_app?>"></script>
|
<script src="https://cdn.jsdelivr.net/npm/hls.js@1/dist/hls.min.js"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
|
|
||||||
<script src="<?=$base_path?>/js/bootstrap.js?v=<?=$version_app?>"></script>
|
|
||||||
<script>
|
<script>
|
||||||
// Passa il percorso base a JavaScript
|
// Percorso base dell'app, letto dagli script
|
||||||
var BASE_PATH = "<?=$base_path?>";
|
var BASE_PATH = "<?=$base_path?>";
|
||||||
|
var APP_VERSION = "<?=$version_app?>";
|
||||||
// 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>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body class="<?php echo $show_app ? 'appBody' : 'desktopBody'; ?>">
|
<body class="app-body">
|
||||||
@@ -1,23 +1,28 @@
|
|||||||
const CACHE_NAME = 'rpigroupplay-v4';
|
const CACHE_NAME = 'rpigroupplay-v5';
|
||||||
const ASSETS = [
|
const ASSETS = [
|
||||||
'./',
|
'./',
|
||||||
'./index.php',
|
'./index.php',
|
||||||
'./manifest.json',
|
'./manifest.json',
|
||||||
'./css/style.css',
|
'./css/style.css',
|
||||||
'./css/bootstrap.css',
|
'./css/fonts/plus-jakarta-sans-latin-wght-normal.woff2',
|
||||||
'./css/animation.css',
|
'./css/fonts/bricolage-grotesque-latin-wght-normal.woff2',
|
||||||
'./js/app.js',
|
'./js/app.js',
|
||||||
'./js/bootstrap.js',
|
'./js/pwa-install.js',
|
||||||
'./img/RpiGroupPlayWHITE.png',
|
'./img/RpiGroupPlayWHITE.png',
|
||||||
'./img/logoapp.png'
|
'./img/logoapp.png',
|
||||||
|
'./img/icons/icon-192x192.png',
|
||||||
|
'./img/icons/icon-512x512.png'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// File statici dell'app: la versione nella query (?v=...) serve solo a svuotare la cache del browser,
|
||||||
|
// per il service worker è lo stesso file
|
||||||
|
const STATIC_RE = /\.(css|js|png|jpe?g|svg|webp|ico|json|woff2?|ttf)$/i;
|
||||||
|
|
||||||
// Install Event
|
// Install Event
|
||||||
self.addEventListener('install', (e) => {
|
self.addEventListener('install', (e) => {
|
||||||
e.waitUntil(
|
e.waitUntil(
|
||||||
caches.open(CACHE_NAME)
|
caches.open(CACHE_NAME)
|
||||||
.then((cache) => {
|
.then((cache) => {
|
||||||
console.log('[Service Worker] Caching static shell');
|
|
||||||
return cache.addAll(ASSETS).catch(err => {
|
return cache.addAll(ASSETS).catch(err => {
|
||||||
console.warn('[Service Worker] Asset caching warning:', err);
|
console.warn('[Service Worker] Asset caching warning:', err);
|
||||||
});
|
});
|
||||||
@@ -33,7 +38,6 @@ self.addEventListener('activate', (e) => {
|
|||||||
return Promise.all(
|
return Promise.all(
|
||||||
keys.map((key) => {
|
keys.map((key) => {
|
||||||
if (key !== CACHE_NAME) {
|
if (key !== CACHE_NAME) {
|
||||||
console.log('[Service Worker] Removing old cache', key);
|
|
||||||
return caches.delete(key);
|
return caches.delete(key);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -51,7 +55,7 @@ self.addEventListener('fetch', (e) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bypass streaming content, APIs, and external domains (like radio/tv streams)
|
// Bypass streaming content, APIs, and external domains (like radio/tv streams, fonts, hls.js)
|
||||||
if (
|
if (
|
||||||
url.includes('stream') ||
|
url.includes('stream') ||
|
||||||
url.includes('.mp3') ||
|
url.includes('.mp3') ||
|
||||||
@@ -60,6 +64,7 @@ self.addEventListener('fetch', (e) => {
|
|||||||
url.includes('.ts') ||
|
url.includes('.ts') ||
|
||||||
url.includes('icecast') ||
|
url.includes('icecast') ||
|
||||||
url.includes('shoutcast') ||
|
url.includes('shoutcast') ||
|
||||||
|
url.includes('nowplaying') ||
|
||||||
url.includes('radiocitta105') ||
|
url.includes('radiocitta105') ||
|
||||||
url.includes('radiodiffusionelibera') ||
|
url.includes('radiodiffusionelibera') ||
|
||||||
!url.startsWith(self.location.origin)
|
!url.startsWith(self.location.origin)
|
||||||
@@ -67,8 +72,11 @@ self.addEventListener('fetch', (e) => {
|
|||||||
return; // Let the browser handle standard streaming/external fetch requests directly
|
return; // Let the browser handle standard streaming/external fetch requests directly
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const isStatic = STATIC_RE.test(new URL(url).pathname);
|
||||||
|
const matchOptions = isStatic ? { ignoreSearch: true } : undefined;
|
||||||
|
|
||||||
e.respondWith(
|
e.respondWith(
|
||||||
caches.match(e.request).then((cachedResponse) => {
|
caches.match(e.request, matchOptions).then((cachedResponse) => {
|
||||||
if (cachedResponse) {
|
if (cachedResponse) {
|
||||||
// Return cached resource immediately and fetch fresh copy in background (Stale-While-Revalidate)
|
// Return cached resource immediately and fetch fresh copy in background (Stale-While-Revalidate)
|
||||||
fetch(e.request).then((networkResponse) => {
|
fetch(e.request).then((networkResponse) => {
|
||||||
|
|||||||
Reference in new issue
Block a user