Compare commits

...

5 Commits

Author SHA1 Message Date
Curry141 be0f07c306
Fixes 2025-06-20 19:39:54 +02:00
Curry141 997c83f6bf
headers 2025-06-20 19:36:11 +02:00
Curry141 b4e3ce2fe6
fix 2025-06-20 19:31:38 +02:00
Curry141 4c74b2f557
added refresh 2025-06-20 19:30:46 +02:00
Curry141 f9d0ddc88a
New service 2025-06-20 19:27:14 +02:00
14 changed files with 49230 additions and 6 deletions

View File

@ -15,7 +15,7 @@
body { body {
margin: 0; margin: 0;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; font-family: Titillium Web;
background-color: var(--bg-color); background-color: var(--bg-color);
color: var(--text-color); color: var(--text-color);
} }
@ -105,3 +105,42 @@ footer {
a { a {
color: orange; 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,12 +5,22 @@
<title>START Romagna - Monitor corse non garantite</title> <title>START Romagna - Monitor corse non garantite</title>
<link rel="stylesheet" href="css/style.css"> <link rel="stylesheet" href="css/style.css">
<link rel="shortcut icon" href="img/favicon.ico"> <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> </head>
<body> <body>
<header> <header>
<center><img src="img/start.png" alt="Start Romagna" width="10%"></center> <nav>
<h1>Monitor corse non garantite</h1> <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> </header>
<center><img src="img/start.png" alt="Start Romagna" width="10%"></center>
<h1>Monitor corse non garantite</h1>
<main> <main>
<form id="formStazione"> <form id="formStazione">
<label for="stazione">Bacino:</label> <label for="stazione">Bacino:</label>

View File

@ -0,0 +1,98 @@
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

@ -0,0 +1,29 @@
<!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.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,41 @@
<!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

@ -0,0 +1,75 @@
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

@ -0,0 +1,64 @@
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 { body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; font-family: Titillium Web;
padding: 20px; padding: 20px;
background-color: #282828; background-color: #282828;
margin: 0; margin: 0;
@ -124,3 +124,42 @@ body {
a { a {
color: orange; 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,8 +6,20 @@
<title>Start Romagna - Autobus in tempo reale</title> <title>Start Romagna - Autobus in tempo reale</title>
<link rel="stylesheet" href="css/style.css"> <link rel="stylesheet" href="css/style.css">
<link rel="shortcut icon" href="img/favicon.ico"> <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> </head>
<body> <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> <center><img src="img/start.png" alt="Start Romagna" width="10%"></center>
<h1>Autobus in tempo reale</h1> <h1>Autobus in tempo reale</h1>
<h3 id="clock">00:00:00</h3> <h3 id="clock">00:00:00</h3>

View File

@ -34,10 +34,11 @@
<div style="height: 35px;"></div> <div style="height: 35px;"></div>
<div class="verticale"> <div class="verticale">
<a class="gbutton" href="/startravenna_bus/listamezzi.html">Lista mezzi</a> <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-livebus/">Autobus in tempo reale</a>
<a class="gbutton" href="/start_menu/servizi/start-corsesopp/">Corse non garantite</a> <a class="gbutton" href="/start_menu/servizi/start-corsesopp/">Corse non garantite</a>
</div> </div>
<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> <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>
</div> </div>
<script src="/scripts/startsearch.js"></script> <script src="/scripts/startsearch.js"></script>
</body> </body>