vers. 2.2.0
This commit is contained in:
@@ -3,6 +3,71 @@
|
|||||||
======================================== */
|
======================================== */
|
||||||
|
|
||||||
|
|
||||||
|
/* ========================================
|
||||||
|
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 */
|
/* Transizione per i link di navigazione */
|
||||||
.navLink,
|
.navLink,
|
||||||
.nav-link,
|
.nav-link,
|
||||||
|
|||||||
@@ -2,7 +2,15 @@
|
|||||||
|
|
||||||
<changelog>
|
<changelog>
|
||||||
|
|
||||||
<version>
|
<version>
|
||||||
|
<number>2.2.0</number>
|
||||||
|
<logs>
|
||||||
|
<log>E' stato reintrodotto la schermata di caricamento ad ogni selezione di ogni pagina dell'applicazione</log>
|
||||||
|
<log>Correzione e bugfix di problematiche varie.</log>
|
||||||
|
</logs>
|
||||||
|
</version>
|
||||||
|
|
||||||
|
<version>
|
||||||
<number>2.1.4</number>
|
<number>2.1.4</number>
|
||||||
<logs>
|
<logs>
|
||||||
<log>Corretto la visione verticale sui dispositivi mobili</log>
|
<log>Corretto la visione verticale sui dispositivi mobili</log>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
<contentplayer>https://www.radiocitta105.it/contentrpigplay</contentplayer>
|
<contentplayer>https://www.radiocitta105.it/contentrpigplay</contentplayer>
|
||||||
</station>
|
</station>
|
||||||
|
|
||||||
<station>
|
<!-- <station>
|
||||||
<id>3</id>
|
<id>3</id>
|
||||||
<name>RadioAI</name>
|
<name>RadioAI</name>
|
||||||
<slogan>Solo musica AI - Powered by RDL </slogan>
|
<slogan>Solo musica AI - Powered by RDL </slogan>
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
<stream>https://srvone.radio.asvhosting.com/listen/radioai/radio.mp3</stream>
|
<stream>https://srvone.radio.asvhosting.com/listen/radioai/radio.mp3</stream>
|
||||||
<streamhls>https://srvone.radio.asvhosting.com/hls/radioai/live.m3u8</streamhls>
|
<streamhls>https://srvone.radio.asvhosting.com/hls/radioai/live.m3u8</streamhls>
|
||||||
<contentplayer></contentplayer>
|
<contentplayer></contentplayer>
|
||||||
</station>
|
</station> -->
|
||||||
|
|
||||||
<!-- <station>
|
<!-- <station>
|
||||||
<id>4</id>
|
<id>4</id>
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
<contentplayer></contentplayer>
|
<contentplayer></contentplayer>
|
||||||
</station> -->
|
</station> -->
|
||||||
|
|
||||||
<station>
|
<!-- <station>
|
||||||
<id>5</id>
|
<id>5</id>
|
||||||
<name>Radio People Italy</name>
|
<name>Radio People Italy</name>
|
||||||
<slogan>La radio della Gente</slogan>
|
<slogan>La radio della Gente</slogan>
|
||||||
@@ -55,6 +55,6 @@
|
|||||||
<stream></stream>
|
<stream></stream>
|
||||||
<streamhls></streamhls>
|
<streamhls></streamhls>
|
||||||
<contentplayer>https://www.rpigroup.it/radiopeopleitaly_contentrpigroup/</contentplayer>
|
<contentplayer>https://www.rpigroup.it/radiopeopleitaly_contentrpigroup/</contentplayer>
|
||||||
</station>
|
</station> -->
|
||||||
|
|
||||||
</radio>
|
</radio>
|
||||||
31
js/app.js
31
js/app.js
@@ -6,6 +6,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
let hlsInstance = null;
|
let hlsInstance = null;
|
||||||
let currentXHR = null;
|
let currentXHR = null;
|
||||||
let isLoading = false;
|
let isLoading = false;
|
||||||
|
let loadingOverlay = null;
|
||||||
|
|
||||||
// WeakMap per tracciare i listener degli elementi
|
// WeakMap per tracciare i listener degli elementi
|
||||||
const linkListeners = new WeakMap();
|
const linkListeners = new WeakMap();
|
||||||
@@ -94,6 +95,27 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mostra l'overlay di caricamento
|
||||||
|
*/
|
||||||
|
function showLoadingOverlay() {
|
||||||
|
if (!loadingOverlay) {
|
||||||
|
loadingOverlay = document.getElementById('loadingOverlay');
|
||||||
|
}
|
||||||
|
if (loadingOverlay) {
|
||||||
|
loadingOverlay.classList.add('active');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Nasconde l'overlay di caricamento
|
||||||
|
*/
|
||||||
|
function hideLoadingOverlay() {
|
||||||
|
if (loadingOverlay) {
|
||||||
|
loadingOverlay.classList.remove('active');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Caricamento pagina con protezione da race condition
|
* Caricamento pagina con protezione da race condition
|
||||||
*/
|
*/
|
||||||
@@ -120,6 +142,9 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Mostra l'overlay di caricamento
|
||||||
|
showLoadingOverlay();
|
||||||
|
|
||||||
// Animazione fade out
|
// Animazione fade out
|
||||||
contentContainer.classList.remove('fade-in');
|
contentContainer.classList.remove('fade-in');
|
||||||
contentContainer.classList.add('fade-out');
|
contentContainer.classList.add('fade-out');
|
||||||
@@ -138,6 +163,9 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
if (this.status === 200) {
|
if (this.status === 200) {
|
||||||
contentContainer.innerHTML = this.responseText;
|
contentContainer.innerHTML = this.responseText;
|
||||||
|
|
||||||
|
// Nascondi overlay di caricamento
|
||||||
|
hideLoadingOverlay();
|
||||||
|
|
||||||
// Animazione fade in
|
// Animazione fade in
|
||||||
contentContainer.classList.remove('fade-out');
|
contentContainer.classList.remove('fade-out');
|
||||||
contentContainer.classList.add('fade-in');
|
contentContainer.classList.add('fade-in');
|
||||||
@@ -175,6 +203,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
|
|
||||||
console.log('Pagina caricata:', page);
|
console.log('Pagina caricata:', page);
|
||||||
} else {
|
} else {
|
||||||
|
hideLoadingOverlay();
|
||||||
contentContainer.innerHTML = '<div class="content-page"><h2>Errore</h2><p>Impossibile caricare la pagina. Codice errore: ' + this.status + '</p></div>';
|
contentContainer.innerHTML = '<div class="content-page"><h2>Errore</h2><p>Impossibile caricare la pagina. Codice errore: ' + this.status + '</p></div>';
|
||||||
contentContainer.classList.remove('fade-out');
|
contentContainer.classList.remove('fade-out');
|
||||||
contentContainer.classList.add('fade-in');
|
contentContainer.classList.add('fade-in');
|
||||||
@@ -185,6 +214,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
currentXHR.onerror = function () {
|
currentXHR.onerror = function () {
|
||||||
isLoading = false;
|
isLoading = false;
|
||||||
currentXHR = null;
|
currentXHR = null;
|
||||||
|
hideLoadingOverlay();
|
||||||
contentContainer.innerHTML = '<div class="content-page"><h2>Errore di connessione</h2><p>Controlla la tua connessione internet e riprova.</p></div>';
|
contentContainer.innerHTML = '<div class="content-page"><h2>Errore di connessione</h2><p>Controlla la tua connessione internet e riprova.</p></div>';
|
||||||
contentContainer.classList.remove('fade-out');
|
contentContainer.classList.remove('fade-out');
|
||||||
contentContainer.classList.add('fade-in');
|
contentContainer.classList.add('fade-in');
|
||||||
@@ -194,6 +224,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
currentXHR.onabort = function () {
|
currentXHR.onabort = function () {
|
||||||
isLoading = false;
|
isLoading = false;
|
||||||
currentXHR = null;
|
currentXHR = null;
|
||||||
|
hideLoadingOverlay();
|
||||||
console.log('Richiesta XHR annullata');
|
console.log('Richiesta XHR annullata');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -93,6 +93,14 @@
|
|||||||
?>
|
?>
|
||||||
</main>
|
</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="footer">
|
||||||
<div class="menu-section">
|
<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/termini-condizioni" data-page="page/termini-condizioni" class="navLink">Termini e Condizioni</a> •
|
||||||
|
|||||||
Reference in New Issue
Block a user