Linea | +Inizio | +Ora di Inizio | +Fine | +Ora di Fine | +Data | +
---|
diff --git a/index.html b/index.html index 0bec5cf..09a4bce 100644 --- a/index.html +++ b/index.html @@ -51,6 +51,7 @@
+ Aggiunti servizi Start.
Aggiunte altre foto di BredaMenarinibus M231CU CNG (+ interni) e Karsan e-ATAK.
Aggiunti Iveco Urbanway 12 Mild Hybrid CNG.
Aggiornata la lista mezzi.
diff --git a/start_menu/servizi/start-corsesopp/css/style.css b/start_menu/servizi/start-corsesopp/css/style.css
new file mode 100644
index 0000000..92a408e
--- /dev/null
+++ b/start_menu/servizi/start-corsesopp/css/style.css
@@ -0,0 +1,106 @@
+:root {
+ --primary-color: #afafaf;
+ --accent-color: #0074d9;
+ --bg-color: #2e2d2d;
+ --white: #ffffff;
+ --light-gray: #848991;
+ --border-color: #727070;
+ --text-color: #ffffff;
+ --black: #000000;
+}
+
+* {
+ box-sizing: border-box;
+}
+
+body {
+ margin: 0;
+ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
+ background-color: var(--bg-color);
+ color: var(--text-color);
+}
+
+header {
+ background-color: var(--bg-color);
+ color: var(--text-color);
+ text-align: center;
+ padding: 20px;
+ /*box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);*/
+}
+
+main {
+ max-width: 900px;
+ margin: 40px auto;
+ padding: 30px;
+ background-color: var(--bg-color);
+ /*border-radius: 10px;*/
+ /*box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);*/
+ text-align: center;
+}
+
+form {
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: center;
+ align-items: center;
+ gap: 15px;
+ margin-bottom: 30px;
+}
+
+form label {
+ font-weight: 600;
+}
+
+form select,
+form button {
+ padding: 10px;
+ font-size: 16px;
+ border-radius: 6px;
+ border: 1px solid var(--border-color);
+}
+
+form button {
+ background-color: var(--accent-color);
+ color: white;
+ border: none;
+ cursor: pointer;
+ transition: background-color 0.3s ease;
+}
+
+form button:hover {
+ background-color: #005fa3;
+}
+
+table {
+ width: 100%;
+ border-collapse: collapse;
+ display: none;
+}
+
+th, td {
+ padding: 12px;
+ border: 1px solid var(--border-color);
+ text-align: left;
+}
+
+th {
+ background-color: var(--light-gray);
+}
+
+tr:nth-child(even) {
+ background-color: #505050;
+}
+
+.loading-message {
+ text-align: center;
+ color: #777;
+ font-style: italic;
+ padding: 20px 0;
+}
+
+footer {
+ text-align: center;
+}
+a {
+ color: var(--text-color);
+}
\ No newline at end of file
diff --git a/start_menu/servizi/start-corsesopp/img/favicon.ico b/start_menu/servizi/start-corsesopp/img/favicon.ico
new file mode 100644
index 0000000..95b83b1
Binary files /dev/null and b/start_menu/servizi/start-corsesopp/img/favicon.ico differ
diff --git a/start_menu/servizi/start-corsesopp/img/start.png b/start_menu/servizi/start-corsesopp/img/start.png
new file mode 100644
index 0000000..b9c43cf
Binary files /dev/null and b/start_menu/servizi/start-corsesopp/img/start.png differ
diff --git a/start_menu/servizi/start-corsesopp/index.html b/start_menu/servizi/start-corsesopp/index.html
new file mode 100644
index 0000000..bfbe505
--- /dev/null
+++ b/start_menu/servizi/start-corsesopp/index.html
@@ -0,0 +1,44 @@
+
+
+
Linea | +Inizio | +Ora di Inizio | +Fine | +Ora di Fine | +Data | +
---|
Caricamento in corso, attendere prego...
Copyright (C) 2025 ER-TPL Team - ertpl.pages.dev - code by EmmeV (Vichingo455) Codice Sorgente
+Start Romagna, Start e il logo Start Romagna sono marchi registrati e protetti da copyright da Start Romagna SpA. Vengono usati in questa pagina solo per riferimento.
+ + + diff --git a/start_menu/servizi/start-livebus/js/script.js b/start_menu/servizi/start-livebus/js/script.js new file mode 100644 index 0000000..c81eeb0 --- /dev/null +++ b/start_menu/servizi/start-livebus/js/script.js @@ -0,0 +1,98 @@ +// Funzione per applicare il filtro su ogni colonna +function applyFilter() { + const filterZona = document.getElementById('filterZona').value.toLowerCase(); + const filterLinea = document.getElementById('filterLinea').value.toLowerCase(); + const filterVeicolo = document.getElementById('filterVeicolo').value.toLowerCase(); + const filterCodiceFermata = document.getElementById('filterCodiceFermata').value.toLowerCase(); + + const table = document.querySelector('table'); + const rows = table.querySelectorAll('tr'); + + rows.forEach((row, index) => { + // Non applicare il filtro sulla prima riga (intestazione) + if (index === 0) return; + + const cells = row.getElementsByTagName('td'); + let match = true; + + // Verifica ogni cella rispetto al filtro per la colonna + if (cells[0] && !cells[0].textContent.toLowerCase().includes(filterZona)) match = false; + if (cells[1] && !cells[1].textContent.toLowerCase().includes(filterLinea)) match = false; + if (cells[4] && !cells[4].textContent.toLowerCase().includes(filterVeicolo)) match = false; + if (cells[3] && !cells[3].textContent.toLowerCase().includes(filterCodiceFermata)) match = false; + + // Mostra o nascondi la riga in base al filtro + row.style.display = match ? '' : 'none'; + }); + } + fetchData(); // Primo fetch + // Fetch dei dati ogni 30 secondi (30 000 millisecondi) + timer = setInterval(() => { + fetchData(); + }, 30000); + // Fetch dei dati e creazione della tabella + function fetchData() { + fetch('https://api.vichingo455.freeddns.org/infobus/') + .then(response => response.json()) + .then(data => { + const container = document.getElementById('data-container'); + container.innerHTML = ''; // Svuota il div prima di aggiungere la tabella + + // Crea la tabella + const table = document.createElement('table'); + + // Aggiungi l'intestazione della tabella + const header = table.createTHead(); + const headerRow = header.insertRow(); + headerRow.insertCell().textContent = 'Zona'; + headerRow.insertCell().textContent = 'Linea'; + headerRow.insertCell().textContent = 'Fermata'; + headerRow.insertCell().textContent = 'Codice Fermata'; + headerRow.insertCell().textContent = 'Veicolo'; + headerRow.insertCell().textContent = ' '; + headerRow.insertCell().textContent = 'Ultimo Aggiornamento'; + + // Aggiungi i dati alla tabella + const tbody = table.createTBody(); + data.forEach(row => { + const rowElement = tbody.insertRow(); + row.forEach(cellData => { + const cell = rowElement.insertCell(); + cell.textContent = cellData; + }); + }); + + // Aggiungi la tabella alla pagina + container.appendChild(table); + // Preserva il filtro + applyFilter(); + }) + .catch(err => { + //console.error("Errore nel caricamento dati:", err); + document.getElementById('data-container').innerHTML = `Errore nel caricamento dei dati. Potrebbe essere un problema di rete, o un problema con la nostra API. Per favore riprova adesso o riprova più tardi.
`; + }); + } + function updateClock() { + const now = new Date(); + const hours = String(now.getHours()).padStart(2, '0'); + const minutes = String(now.getMinutes()).padStart(2, '0'); + const seconds = String(now.getSeconds()).padStart(2, '0'); + document.getElementById('clock').textContent = `${hours}:${minutes}:${seconds}`; + } + function clearFilters() { + // Pulisci tutti i filtri + document.getElementById("filterZona").value = ""; + document.getElementById("filterLinea").value = ""; + document.getElementById("filterVeicolo").value = ""; + document.getElementById("filterCodiceFermata").value = ""; + // Esegui la funzione per applicare i filtri (per sicurezza) + applyFilter(); + } + + setInterval(updateClock, 1000); + updateClock(); +// Applica il filtro ogni volta che l'utente digita +document.getElementById('filterZona').addEventListener('input', applyFilter); +document.getElementById('filterLinea').addEventListener('input', applyFilter); +document.getElementById('filterVeicolo').addEventListener('input', applyFilter); +document.getElementById('filterCodiceFermata').addEventListener('input', applyFilter); diff --git a/start_menu/start.html b/start_menu/start.html index 65e4155..ad3dd32 100644 --- a/start_menu/start.html +++ b/start_menu/start.html @@ -32,9 +32,12 @@ ExtraurbanoI servizi "Autobus in tempo reale" e "Corse non garantite" fanno uso di dati forniti da servizi Start Romagna.
L'unica cosa che facciamo è ottenerli e impaginarli in maniera differente dai servizi Start, spesso perchè fatti male.