Test failover immagini seta urb

This commit is contained in:
Leocraft1 2025-04-12 13:31:53 +00:00
parent 7312aa5db4
commit 827965a8bb
3 changed files with 20 additions and 2 deletions

8
scripts/images.js Normal file
View File

@ -0,0 +1,8 @@
document.querySelectorAll('img').forEach(img => {
img.addEventListener('error', function () {
const fallback = this.getAttribute('data-fallback');
if (fallback && this.src !== fallback) {
this.src = fallback;
}
});
});

View File

@ -26,11 +26,21 @@
</nav> </nav>
</header> </header>
<h1>Autobus Urbani di SETA Modena</h1> <h1>Autobus Urbani di SETA Modena</h1>
<script>
document.querySelectorAll('img').forEach(img => {
img.addEventListener('error', function () {
const fallback = this.getAttribute('data-fallback');
if (fallback && this.src !== fallback) {
this.src = fallback;
}
});
});
</script>
<table class="image-table"> <table class="image-table">
<tr> <tr>
<td> <td>
<p>113, 115-117, 120-121, 123-125, 128-132<br>Mercedes Citaro O530N Diesel</p> <p>113, 115-117, 120-121, 123-125, 128-132<br>Mercedes Citaro O530N Diesel</p>
<a href="/setamodena_bus/urbano/citarodiesel.html"><img class="bus" src="https://drive-vichingo455.duckdns.org/apps/files_sharing/publicpreview/dydYxaqMrKce3Zj?file=/Leo/SETA/Citaro%20Diesel/117-2.jpg&fileId=234151&x=1920&y=1080"alt="Server foto non raggiungibile." style="width:100%"></a> <a href="/setamodena_bus/urbano/citarodiesel.html"><img class="bus" src="http://serverissimo.freeddns.org:30081/apps/files_sharing/publicpreview/ffdqobqRg2ezKXt?file=/Leo/SETA/Citaro%20Diesel/117-2.jpg&fileId=9674&x=1920&y=1080&etag=cb5efc9e356f03195595921d182a8f54" data-fallback="https://drive-vichingo455.duckdns.org/apps/files_sharing/publicpreview/dydYxaqMrKce3Zj?file=/Leo/SETA/Citaro%20Diesel/117-2.jpg&fileId=234151&x=1920&y=1080" alt="Server foto non raggiungibile." style="width:100%"></a>
</td> </td>
<td> <td>
<p>133-142<br>Irisbus Cityclass CNG CURSOR (ATCM)</p> <p>133-142<br>Irisbus Cityclass CNG CURSOR (ATCM)</p>

View File

@ -73,7 +73,7 @@
<url> <url>
<loc>https://ertpl.pages.dev/seta_menu/setaurbano.html</loc> <loc>https://ertpl.pages.dev/seta_menu/setaurbano.html</loc>
<priority>0.75</priority> <priority>0.75</priority>
<lastmod>2025-04-11</lastmod> <lastmod>2025-04-12</lastmod>
</url> </url>
<url> <url>
<loc>https://ertpl.pages.dev/seta_menu/setastreetview.html</loc> <loc>https://ertpl.pages.dev/seta_menu/setastreetview.html</loc>