mirror of
https://github.com/Daniongithub/ER-TPL.git
synced 2025-12-06 11:02:02 +00:00
Aggiornamento frequenze
This commit is contained in:
@@ -40,7 +40,7 @@
|
|||||||
<p class="piccolospazio">
|
<p class="piccolospazio">
|
||||||
<strong>Servizi rapidi:</strong> <a class="novita" href="/seta_menu/cercaorario/index.html">Cerca orario</a> <br> <br>
|
<strong>Servizi rapidi:</strong> <a class="novita" href="/seta_menu/cercaorario/index.html">Cerca orario</a> <br> <br>
|
||||||
Nuove foto: <a class="novita" href="/setamodena_bus/suburbano/urbinostart.html">Solaris Urbino 18 III ex START</a>. <br> <br>
|
Nuove foto: <a class="novita" href="/setamodena_bus/suburbano/urbinostart.html">Solaris Urbino 18 III ex START</a>. <br> <br>
|
||||||
In sviluppo il servizio "Frequenze e tempi di percorrenza".
|
In sviluppo il servizio "Frequenze e tempi di percorrenza"
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="riga">
|
<div class="riga">
|
||||||
|
|||||||
@@ -17,21 +17,17 @@ body {
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
table {
|
#link-a-seta{
|
||||||
border-collapse: collapse;
|
margin:8px;
|
||||||
border-radius: 8px;
|
|
||||||
min-width: 85%;
|
|
||||||
max-width: 100%;
|
|
||||||
margin: auto;
|
|
||||||
margin-top: 18px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
th {
|
table{
|
||||||
background-color: rgb(204, 132, 0);
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
th,td {
|
th,td {
|
||||||
border: 2px solid #444;
|
border: none;
|
||||||
padding: .7vw;
|
padding: .7vw;
|
||||||
padding-top: .6vw;
|
padding-top: .6vw;
|
||||||
padding-bottom: .6vw;
|
padding-bottom: .6vw;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<html lang="it">
|
<html lang="it">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="description" content="Visualizza i percorsi di SETA a Modena.">
|
<meta name="description" content="Visualizza i tempi di percorrenza di SETA a Modena.">
|
||||||
<meta name="keywords" content="seta, modena, seta-modena, orari, in, tempo, reale, autobus, fermate, orario, palina">
|
<meta name="keywords" content="seta, modena, seta-modena, orari, in, tempo, reale, autobus, fermate, orario, palina">
|
||||||
<meta name="author" content="ER-TPL Team">
|
<meta name="author" content="ER-TPL Team">
|
||||||
<title>SETA Modena - Tempi di percorrenza</title>
|
<title>SETA Modena - Tempi di percorrenza</title>
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
<html lang="it">
|
<html lang="it">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="description" content="Visualizza i percorsi di SETA a Modena.">
|
<meta name="description" content="Visualizza i tempi di percorrenza di SETA a Modena.">
|
||||||
<meta name="keywords" content="seta, modena, seta-modena, orari, in, tempo, reale, autobus, fermate, orario, palina">
|
<meta name="keywords" content="seta, modena, seta-modena, orari, in, tempo, reale, autobus, fermate, orario, palina">
|
||||||
<meta name="author" content="ER-TPL Team">
|
<meta name="author" content="ER-TPL Team">
|
||||||
<title>SETA Modena - Percorsi</title>
|
<title>SETA Modena - Tempi di percorrenza</title>
|
||||||
<link rel="stylesheet" href="css/style.css">
|
<link rel="stylesheet" href="css/style.css">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<link rel="shortcut icon" href="https://www.setaweb.it/images/favicon/android-icon-192x192.png">
|
<link rel="shortcut icon" href="https://www.setaweb.it/images/favicon/android-icon-192x192.png">
|
||||||
@@ -24,7 +24,8 @@
|
|||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<h1>Frequenze e tempi di percorrenza linea: <span id="linea-span"></span></h1>
|
<h1>Frequenze e tempi di percorrenza linea: <span id="linea-span"></span></h1>
|
||||||
<div id="urbano-container"></div>
|
<div id="desc-container"></div>
|
||||||
|
<div id="link-a-seta"></div>
|
||||||
<footer>
|
<footer>
|
||||||
<div>
|
<div>
|
||||||
<p>Copyright (C) 2025 ER-TPL Team - <a href="https://ertpl.pages.dev" target="_blank">ertpl.pages.dev</a> - code by Il Dani & SetaModenaFanpage <a href="https://github.com/Leocraft1/SetaAPI" target="_blank">Codice Sorgente</a> - I loghi SETA Spa sono marchi registrati e sono inseriti in questo sito solo a scopo di illustrazione.</p>
|
<p>Copyright (C) 2025 ER-TPL Team - <a href="https://ertpl.pages.dev" target="_blank">ertpl.pages.dev</a> - code by Il Dani & SetaModenaFanpage <a href="https://github.com/Leocraft1/SetaAPI" target="_blank">Codice Sorgente</a> - I loghi SETA Spa sono marchi registrati e sono inseriti in questo sito solo a scopo di illustrazione.</p>
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
const params = new URLSearchParams(window.location.search);
|
const params = new URLSearchParams(window.location.search);
|
||||||
const num = params.get('routenum');
|
const num = params.get('routenum');
|
||||||
const lineaSpan = document.getElementById('linea-span');
|
const lineaSpan = document.getElementById('linea-span');
|
||||||
|
const descContainer = document.getElementById('desc-container');
|
||||||
|
const linkContainer = document.getElementById('link-a-seta');
|
||||||
|
|
||||||
const urlDesc = "https://setaapi.serverissimo.freeddns.org/frequencydescription/"+num;
|
const urlDesc = "https://setaapi.serverissimo.freeddns.org/frequencydescription/"+num;
|
||||||
|
|
||||||
@@ -9,3 +11,36 @@ lineaSpan.innerHTML=num;
|
|||||||
|
|
||||||
//Contenuto del testo
|
//Contenuto del testo
|
||||||
fetch(urlDesc)
|
fetch(urlDesc)
|
||||||
|
.then(response => {
|
||||||
|
if (!response.ok) throw new Error("Impossibile raggiungere il server.");
|
||||||
|
return response.json();
|
||||||
|
})
|
||||||
|
.then(data =>{
|
||||||
|
descContainer.innerHTML=`
|
||||||
|
<table id="desc-table">
|
||||||
|
<th>Destinazione</th>
|
||||||
|
<th>Tempo di percorrenza</th>
|
||||||
|
<th>Frequenza</th>
|
||||||
|
</table>`;
|
||||||
|
const table = document.getElementById('desc-table');
|
||||||
|
if(data[0].linea==undefined){
|
||||||
|
descContainer.innerHTML="La linea specificata non possiede nessuna descrizione valida.";
|
||||||
|
}
|
||||||
|
var i=0;
|
||||||
|
data[0].destinazioni.forEach(element => {
|
||||||
|
var tr = document.createElement('tr');
|
||||||
|
var td = document.createElement('td');
|
||||||
|
td.innerHTML=data[0].destinazioni[i];
|
||||||
|
tr.appendChild(td);
|
||||||
|
var td = document.createElement('td');
|
||||||
|
td.innerHTML=data[0].percorrenza[i];
|
||||||
|
tr.appendChild(td);
|
||||||
|
var td = document.createElement('td');
|
||||||
|
td.innerHTML=data[0].frequenze[i];
|
||||||
|
tr.appendChild(td);
|
||||||
|
table.appendChild(tr);
|
||||||
|
i++;
|
||||||
|
});
|
||||||
|
linkContainer.innerHTML=`<a href="${data[0].linkseta}" class="biancosott">Visualizza sul sito seta</a>`;
|
||||||
|
})
|
||||||
|
.catch(error => {descContainer.innerHTML="La linea specificata non possiede nessuna descrizione valida.";console.error(error);})
|
||||||
Reference in New Issue
Block a user