Compare commits

..

No commits in common. "be0f07c306932b0e0c1ee589109d8b1961f2322a" and "0c2886591fbd074c6ce4fa31e52488bf7da408ae" have entirely different histories.

14 changed files with 6 additions and 49230 deletions

View File

@ -15,7 +15,7 @@
body {
margin: 0;
font-family: Titillium Web;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: var(--bg-color);
color: var(--text-color);
}
@ -105,42 +105,3 @@ footer {
a {
color: orange;
}
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.index{
display: flex;
min-height: 51px;
}
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;
}

View File

@ -5,22 +5,12 @@
<title>START Romagna - Monitor corse non garantite</title>
<link rel="stylesheet" href="css/style.css">
<link rel="shortcut icon" href="img/favicon.ico">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Titillium+Web:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700&display=swap" rel="stylesheet">
</head>
<body>
<header>
<nav>
<ul>
<li><a href="/index.html"><h1 style="font-size: 100%;font-weight: 500;">Home</h1></a></li>
<li><a href="/ravenna_menu/ravenna.html"><h1 style="font-size: 100%;font-weight: 500;">Ravenna</h1></a></li>
<li><a href="/start_menu/start.html"><h1 style="font-size: 100%;font-weight: 500;">START Romagna</h1></a></li>
</ul>
</nav>
<center><img src="img/start.png" alt="Start Romagna" width="10%"></center>
<h1>Monitor corse non garantite</h1>
</header>
<center><img src="img/start.png" alt="Start Romagna" width="10%"></center>
<h1>Monitor corse non garantite</h1>
<main>
<form id="formStazione">
<label for="stazione">Bacino:</label>

View File

@ -1,98 +0,0 @@
body {
background-color: #282828;
text-align: center;
color: white;
font-family: Titillium Web;
}
.search-result {
border: 2px solid white;
border-radius: 8px;
width: 15%;
margin: auto;
margin-left: 5px;
margin-right: 5px;
margin-top: 10px;
cursor: pointer;
display: inline-block;
}
table {
border-collapse: collapse;
border-radius: 8px;
width: 85%;
margin: auto;
margin-top: 1rem;
}
th {
background-color: lightslategray;
}
th,
td {
border: 2px solid #444;
padding: 8px;
text-align: left;
}
tr:nth-child(even) {
background-color: dimgray;
}
.bus-card-red {
background-color: rgb(241, 120, 120) !important;
}
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.index {
display: flex;
min-height: 51px;
}
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;
}
@media (max-width: 768px) {
.search-result {
display: block;
}
}

View File

@ -1,29 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>START Romagna - Informazioni fermata</title>
<link rel="stylesheet" href="css/style.css">
<link rel="shortcut icon" href="img/favicon.ico">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Titillium+Web:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700&display=swap" rel="stylesheet">
</head>
<body>
<header>
<nav>
<ul>
<li><a href="index.html"><p>Home</p></a></li>
</ul>
</nav>
</header>
<h2>Informazioni fermata</h2>
<div id="tabella-container">Caricamento dati...</div>
<footer>
<p>Copyright (C) 2025 ER-TPL Team - <a href="https://ertpl.pages.dev" target="_blank">ertpl.pages.dev</a> - code by Il Dani <a href="https://git.vichingo455.freeddns.org/daniele/start-fermatebus" target="_blank">Codice Sorgente</a><br>
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.</p>
</footer>
<script src="js/fermata.js"></script>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -1,41 +0,0 @@
<!DOCTYPE html>
<html lang="it">
<head>
<meta charset="UTF-8">
<title>START Romagna - Visualizza fermata</title>
<link rel="stylesheet" href="css/style.css">
<link rel="shortcut icon" href="img/favicon.ico">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Titillium+Web:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700&display=swap" rel="stylesheet">
</head>
<body>
<header>
<nav>
<ul>
<li><a href="/index.html"><h1 style="font-size: 100%;font-weight: 500;">Home</h1></a></li>
<li><a href="/ravenna_menu/ravenna.html"><h1 style="font-size: 100%;font-weight: 500;">Ravenna</h1></a></li>
<li><a href="/start_menu/start.html"><h1 style="font-size: 100%;font-weight: 500;">START Romagna</h1></a></li>
</ul>
</nav>
</header>
<h1>Visualizzatore fermate START Romagna</h1>
<label for="bacino">Bacino:</label>
<select id="bacino">
<option value="" selected>--Scegli un'opzione--</option>
<option value="ra">Ravenna</option>
<option value="rn">Rimini</option>
<option value="fc">Forlì-Cesena</option>
</select>
<div>
<label for="searchBar">Cerca fermata:</label>
<input type="text" id="searchBar" placeholder="Cerca una fermata...">
</div>
<div id="searchResults"></div>
<footer>
<p>Copyright (C) 2025 ER-TPL Team - <a href="https://ertpl.pages.dev" target="_blank">ertpl.pages.dev</a> - code by Il Dani <a href="https://git.vichingo455.freeddns.org/daniele/start-fermatebus" target="_blank">Codice Sorgente</a><br>
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.</p>
</footer>
<script src="js/cercafermata.js"></script>
</body>
</html>

View File

@ -1,75 +0,0 @@
function loadJSON(file, callback) {
fetch(file)
.then(response => response.json())
.then(data => callback(data))
.catch(error => console.error('Errore nel caricare il file JSON:', error));
}
function populateSearchResults(results, selectedOption) {
const searchResultsContainer = document.getElementById('searchResults');
searchResultsContainer.innerHTML = '';
if (results.length === 0) {
searchResultsContainer.innerHTML = '<p>Nessun risultato trovato</p>';
return;
}
results.forEach(item => {
const div = document.createElement('div');
div.className = 'search-result';
div.innerHTML = `
<div>
<h3>${item.nome}</h3>
<p>Palina: ${item.palina}, Target ID: ${item.targetID}</p>
</div>
`;
div.addEventListener('click', () => {
const url = `fermata.html?palina=${encodeURIComponent(item.palina)}&targetID=${encodeURIComponent(item.targetID)}&selectedOption=${encodeURIComponent(selectedOption)}`;
window.location.href = url;
});
searchResultsContainer.appendChild(div);
});
}
function filterOptions(query, data) {
return data.filter(item => item.nome.toLowerCase().includes(query.toLowerCase()));
}
let allOptions = [];
let currentSelectedOption = '';
const searchBar = document.getElementById('searchBar');
searchBar.addEventListener('input', function() {
const query = searchBar.value;
const filteredOptions = filterOptions(query, allOptions);
populateSearchResults(filteredOptions, currentSelectedOption);
});
document.getElementById('bacino').addEventListener('change', function(event) {
const selectedOption = event.target.value;
currentSelectedOption = selectedOption;
let file = '';
switch (selectedOption) {
case 'ra':
file = 'js/fermate-ra.json';
break;
case 'rn':
file = 'js/fermate-rn.json';
break;
case 'fc':
file = 'js/fermate-fc.json';
break;
default:
allOptions = [];
document.getElementById('searchResults').innerHTML = '';
return;
}
loadJSON(file, (data) => {
allOptions = data;
populateSearchResults(allOptions, currentSelectedOption);
});
});

View File

@ -1,64 +0,0 @@
const params = new URLSearchParams(window.location.search);
const palina = params.get('palina');
const targetID = params.get('targetID');
const selectedOption = params.get('selectedOption');
console.log(palina, targetID, selectedOption);
// Esempio URL backend che ritorna JSON { linea, destinazione, veicolo, soppressa }
const urlBackend = `https://api.vichingo455.freeddns.org/start-fermatebus.json/?param=${targetID}&param2=${selectedOption}&palina=${palina}`;
function caricadati(){
fetch(urlBackend)
.then(res => res.json())
.then(data => {
const container = document.getElementById('tabella-container');
container.innerHTML = '';
if (!data || data.length === 0) {
container.textContent = 'Nessun dato trovato.';
return;
}
// Creo tabella
const table = document.createElement('table');
// Intestazione
const thead = document.createElement('thead');
thead.innerHTML = `
<tr>
<th>Linea</th>
<th>Destinazione</th>
<th>Veicolo</th>
<th>Soppressa</th>
</tr>
`;
table.appendChild(thead);
// Corpo tabella
const tbody = document.createElement('tbody');
data.forEach(item => {
const tr = document.createElement('tr');
if (item.soppressa) {
tr.classList.add('bus-card-red');
}
tr.innerHTML = `
<td>${item.linea}</td>
<td>${item.destinazione}</td>
<td>${item.mezzo}</td>
<td>${item.soppressa ? 'Sì' : 'No'}</td>
`;
tbody.appendChild(tr);
});
table.appendChild(tbody);
container.appendChild(table);
})
.catch(err => {
console.error('Errore nel caricamento dati:', err);
document.getElementById('tabella-container').textContent = 'Errore nel caricamento dati.';
});
}
caricadati();
setInterval(caricadati, 60000);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
body {
font-family: Titillium Web;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
padding: 20px;
background-color: #282828;
margin: 0;
@ -124,42 +124,3 @@ body {
a {
color: orange;
}
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.index{
display: flex;
min-height: 51px;
}
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;
}

View File

@ -6,20 +6,8 @@
<title>Start Romagna - Autobus in tempo reale</title>
<link rel="stylesheet" href="css/style.css">
<link rel="shortcut icon" href="img/favicon.ico">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Titillium+Web:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700&display=swap" rel="stylesheet">
</head>
<body>
<header>
<nav>
<ul>
<li><a href="/index.html"><h1 style="font-size: 100%;font-weight: 500;">Home</h1></a></li>
<li><a href="/ravenna_menu/ravenna.html"><h1 style="font-size: 100%;font-weight: 500;">Ravenna</h1></a></li>
<li><a href="/start_menu/start.html"><h1 style="font-size: 100%;font-weight: 500;">START Romagna</h1></a></li>
</ul>
</nav>
</header>
<center><img src="img/start.png" alt="Start Romagna" width="10%"></center>
<h1>Autobus in tempo reale</h1>
<h3 id="clock">00:00:00</h3>

View File

@ -34,11 +34,10 @@
<div style="height: 35px;"></div>
<div class="verticale">
<a class="gbutton" href="/startravenna_bus/listamezzi.html">Lista mezzi</a>
<a class="gbutton" href="/start_menu/servizi/start-fermatebus/">Visualizzatore fermate</a>
<a class="gbutton" href="/start_menu/servizi/start-livebus/">Autobus in tempo reale</a>
<a class="gbutton" href="/start_menu/servizi/start-corsesopp/">Corse non garantite</a>
</div>
<p>I servizi "Visualizzatore fermate", "Autobus in tempo reale" e "Corse non garantite" fanno uso di dati forniti da servizi Start Romagna. <br>L'unica cosa che facciamo è ottenerli e impaginarli in maniera differente dai servizi Start, spesso perchè fatti male.</p>
<p>I servizi "Autobus in tempo reale" e "Corse non garantite" fanno uso di dati forniti da servizi Start Romagna. <br>L'unica cosa che facciamo è ottenerli e impaginarli in maniera differente dai servizi Start, spesso perchè fatti male.</p>
</div>
<script src="/scripts/startsearch.js"></script>
</body>