From 9bd8d5cad808af146412efca7ed49350d8fe6229 Mon Sep 17 00:00:00 2001 From: Leocraft1 Date: Mon, 25 Aug 2025 16:11:02 +0200 Subject: [PATCH] Sono rinnovati --- seta_menu/percorsi/css/style.css | 197 ++++++++++++++++++++++++++ seta_menu/percorsi/index.html | 48 +++++++ seta_menu/percorsi/js/linea.js | 202 +++++++++++++++++++++++++++ seta_menu/percorsi/js/script.js | 0 seta_menu/setasub.html | 2 +- setamodena_bus/suburbano/newman.html | 2 +- sitemap.xml | 9 +- 7 files changed, 456 insertions(+), 4 deletions(-) create mode 100644 seta_menu/percorsi/css/style.css create mode 100644 seta_menu/percorsi/index.html create mode 100644 seta_menu/percorsi/js/linea.js create mode 100644 seta_menu/percorsi/js/script.js diff --git a/seta_menu/percorsi/css/style.css b/seta_menu/percorsi/css/style.css new file mode 100644 index 0000000..fcf55cc --- /dev/null +++ b/seta_menu/percorsi/css/style.css @@ -0,0 +1,197 @@ +body { + background-color: #282828; + text-align: center; + color: white; + font-family: Titillium Web; +} + +.search-result { + border: 2px solid white; + border-radius: 8px; + width: 20vw; + margin: auto; + margin-left: 5px; + margin-right: 5px; + margin-top: 10px; + cursor: pointer; + display: inline-block; +} + +table { + border-collapse: collapse; + border-radius: 8px; + min-width: 85%; + max-width: 100%; + margin: auto; + margin-top: 18px; +} + +th { + background-color: rgb(204, 132, 0); +} + +th,td { + border: 2px solid #444; + padding: .7vw; + padding-top: .6vw; + padding-bottom: .6vw; + text-align: left; +} + +.bus-card-red { + background-color: rgb(241, 120, 120) !important; +} + +hr{ + margin-top:19px; +} + +h1.warning { + color:red; + font-size: 16px; +} + +h1.yellow-warning { + color:rgb(255, 205, 0); + font-size: 16px; +} + +header { + font-size: 67%; + background-color: #333; + height: auto; + padding: 0px 0px; + align-items: start; + width: 100%; + border-radius: 10px; +} + +nav ul { + list-style-type: none; + margin: 0; + padding: 0; + display: flex; + justify-content: left; +} + +nav { + text-align: center; + flex-shrink: 0; +} + +nav#corsie-nav ul{ + justify-content: center; +} +nav#corsie-nav ul li a{ + color: white; + text-decoration: underline; +} +nav#corsie-nav ul li{ + margin-left: 8px; + margin-right: 7px; +} +nav ul li { + margin-left: 20px; + margin-right: 20px; +} + +nav ul li a { + color: #fff; + text-decoration: none; + font-size: 16px; +} + +nav ul li a:hover { + text-decoration: underline; +} + +a { + color: orange; +} + +a.bianco{ + color: white; + text-decoration: none; +} + +a.biancosott{ + color: white; +} +a.link-cell { + display: block; + width: 100%; + height: 100%; + color: white; +} + +#bacino, +#searchBar { + padding: 10px; + font-size: 16px; + border-radius: 6px; + border: 1px solid var(--border-color); + width: 280px; +} +#stopCodeBar { + padding: 10px; + font-size: 16px; + border-radius: 6px; + border: 1px solid var(--border-color); + width: 280px; +} +img{ + height:300px; +} + +@media (max-width: 768px) { + .search-result { + display: block; + width: 95.5%; + } + .container { + flex-direction: column; + } + th,td { + font-size: 70%; + } + nav#corsie-nav ul li a{ + font-size: 75%; + margin: 0; + } + table { + margin-top: 10px; + } + h2{ + margin-bottom: 0; + } + h2.noreduction{ + margin-bottom: 16px; + } + #searchBar { + width: 80%; + } + #stopCodeBar { + width: 80%; + } + hr{ + margin-bottom:19px; + } + img{ + width: 98%; + height: auto; + } +} + +footer { + position: relative; + bottom: 0; + left: 0; + width: 100%; +} +div.search-result div{ + margin-left: 10px; + margin-right: 10px; +} +p.space{ + width: 20px; +} \ No newline at end of file diff --git a/seta_menu/percorsi/index.html b/seta_menu/percorsi/index.html new file mode 100644 index 0000000..9143f58 --- /dev/null +++ b/seta_menu/percorsi/index.html @@ -0,0 +1,48 @@ + + + + + + + + SETA Modena - Bus in servizio + + + + + + + + +
+ +
+

No

+

No:

+
+

No

+

No

+

No

+
+ + + + \ No newline at end of file diff --git a/seta_menu/percorsi/js/linea.js b/seta_menu/percorsi/js/linea.js new file mode 100644 index 0000000..88a21d5 --- /dev/null +++ b/seta_menu/percorsi/js/linea.js @@ -0,0 +1,202 @@ +const params = new URLSearchParams(window.location.search); +const id = params.get('id'); + +//Sets stop name +const numero_span = document.getElementById('numero-span'); +numero_span.textContent=id; + +const urlBackend = `https://setaapi.serverissimo.freeddns.org/vehicleinfo/${id}`; +//const urlBackend = `http://localhost:5001/arrivals/${codice}`; +function caricadati(){ + var item=[]; + fetch(urlBackend) + .then(response => { + if (!response.ok) throw new Error("Errore di risposta nel caricamento dei dati, probabilmente il server API è offline."); + return response.json(); + }) + .then(data => { + item = data; + }) + .then(data => { + + const container = document.getElementById('tabella-container'); + container.innerHTML = ''; + // Creo tabella + const table = document.createElement('table'); + + // Intestazione + const thead = document.createElement('thead'); + thead.innerHTML = ` + + Informazioni veicolo: + + `; + table.appendChild(thead); + + // Corpo tabella + const tbody = document.createElement('tbody'); + item.features.forEach(element => { + const bus = element.properties; + var tr = document.createElement('tr'); + tr.innerHTML = ` + + Linea: + ${bus.linea} + + `; + tbody.appendChild(tr); + tr = document.createElement('tr'); + tr.innerHTML = ` + + Direzione: + ${bus.route_desc} + + `; + tbody.appendChild(tr); + tr = document.createElement('tr'); + tr.innerHTML = ` + + Tipo linea: + ${bus.service_tag} + + `; + tbody.appendChild(tr); + //Ritardo col + + if(bus.delay>0){ + bus.delay="+"+bus.delay; + } + tr = document.createElement('tr'); + tr.innerHTML = ` + + Ritardo/Anticipo: (+/-) + ${bus.delay} + + `; + tbody.appendChild(tr); + tr = document.createElement('tr'); + tr.innerHTML = ` + + Numero mezzo: + ${bus.vehicle_code} + + `; + tbody.appendChild(tr); + tr = document.createElement('tr'); + tr.innerHTML = ` + + Modello: + ${bus.model} + + `; + tbody.appendChild(tr); + tr = document.createElement('tr'); + tr.innerHTML = ` + + Targa: + ${bus.plate_num} + + `; + tbody.appendChild(tr); + //Si o no pedana + if(bus.pedana==1){ + bus.pedana="Sì"; + }else{ + bus.pedana="No"; + } + tr = document.createElement('tr'); + tr.innerHTML = ` + + Pedana?: + ${bus.pedana} + + `; + tbody.appendChild(tr); + tr = document.createElement('tr'); + tr.innerHTML = ` + + Ora si trova a: + ${bus.next_stop} + + `; + tbody.appendChild(tr); + tr = document.createElement('tr'); + tr.innerHTML = ` + + Codice percorso: + ${bus.route_code} + + `; + tbody.appendChild(tr); + tr = document.createElement('tr'); + tr.innerHTML = ` + + Codice corsa: + ${bus.journey_code} + + `; + tbody.appendChild(tr); + //Colore sfondo conta passeggeri + if(bus.num_passeggeri<=bus.posti_totali/4){ + tr = document.createElement('tr'); + tr.innerHTML = ` + + Numero passeggeri a bordo: + ${bus.num_passeggeri} + + `; + }else if(bus.num_passeggeri<=bus.posti_totali/1.8){ + tr = document.createElement('tr'); + tr.innerHTML = ` + + Numero passeggeri a bordo: + ${bus.num_passeggeri} + + `; + }else{ + tr = document.createElement('tr'); + tr.innerHTML = ` + + Numero passeggeri a bordo: + ${bus.num_passeggeri} + + `; + }if(bus.num_passeggeri==null){ + tr = document.createElement('tr'); + tr.innerHTML = ` + + Numero passeggeri a bordo: + Non disponibile + + `; + } + tbody.appendChild(tr); + tr = document.createElement('tr'); + tr.innerHTML = ` + + Numero posti totali (in piedi + sedili): + ${bus.posti_totali} + + `; + tbody.appendChild(tr); + tr = document.createElement('tr'); + tr.innerHTML = ` + + Posizione: + GPS + + `; + tbody.appendChild(tr); + + }); + table.appendChild(tbody); + container.appendChild(table); + }) + .catch(err => { + console.error('Errore nel caricamento dati:', err); + document.getElementById('tabella-container').textContent = "Errore nella sintassi dei dati ricevuti."; + }); +} + +caricadati(); + +setInterval(caricadati, 60000); \ No newline at end of file diff --git a/seta_menu/percorsi/js/script.js b/seta_menu/percorsi/js/script.js new file mode 100644 index 0000000..e69de29 diff --git a/seta_menu/setasub.html b/seta_menu/setasub.html index 237bf97..c245829 100644 --- a/seta_menu/setasub.html +++ b/seta_menu/setasub.html @@ -125,7 +125,7 @@ -

4850-4852
MAN Lion's City 19G

+

4850-4852
New MAN Lion's City 19G

Server foto non raggiungibile.
diff --git a/setamodena_bus/suburbano/newman.html b/setamodena_bus/suburbano/newman.html index 893b80e..63203f2 100644 --- a/setamodena_bus/suburbano/newman.html +++ b/setamodena_bus/suburbano/newman.html @@ -21,7 +21,7 @@ -

4850-4852
MAN Lion's City 19G

+

4850-4852
New MAN Lion's City 19G

Sono stati comprati nel 2022 da SETA assieme agli Urbanway Mild Hybrid. Hanno sedili in plastica e svolgono corse scolastiche, suburbane e qualche raro turno di 7 in estate.

Hanno motore Euro 6 MAN e cambio voith.

Video sul Bus diff --git a/sitemap.xml b/sitemap.xml index 71be5e2..04dcca7 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -20,6 +20,11 @@ 0.60 2025-08-04 + + https://ertpl.pages.dev/percorsi/index.html + 0.60 + 2025-08-04 + https://ertpl.pages.dev/tper_menu/tperext.html 0.60 @@ -63,7 +68,7 @@ https://ertpl.pages.dev/seta_menu/setasub.html 0.60 - 2025-08-22 + 2025-08-25 https://ertpl.pages.dev/seta_menu/setastreetview.html @@ -523,7 +528,7 @@ https://ertpl.pages.dev/setamodena_bus/suburbano/newman.html 0.40 - 2025-07-12 + 2025-08-25 https://ertpl.pages.dev/setamodena_bus/suburbano/manl.html