Sistemazione + esiste? + fine manutenzione percorsi seta

This commit is contained in:
Leocraft1
2025-11-06 18:31:07 +01:00
parent 05c67af6fb
commit deb684c8b8
4 changed files with 23 additions and 2 deletions

View File

@@ -152,6 +152,17 @@ img{
height:300px;
}
.green-bold{
color:green;
font-weight: bold;
}
.red-bold{
color:rgba(255, 50, 50, 1);
font-weight: bold;
}
@media (max-width: 768px) {
.search-result {
display: block;

View File

@@ -4,6 +4,7 @@ const num = params.get('routenum');
const codiceSpan = document.getElementById('codice-span');
const destSpan = document.getElementById('destinazione-span');
const pNav = document.getElementById('percorso-nav');
const existP = document.getElementById('esiste-p');
//Displays route code
codiceSpan.textContent = id;
@@ -29,6 +30,14 @@ function caricadati(){
item = data;
})
.then(data => {
//Display testo esiste o no
if(item.stillExists==true){
existP.setAttribute("class","green-bold");
existP.innerHTML="Questo percorso esiste ancora"
}else if(item.stillExists==undefined){}else{
existP.setAttribute("class","red-bold");
existP.innerHTML="Questo percorso non esiste più"
}
const container = document.getElementById('tabella-container');
container.innerHTML = '';
// Creo tabella
@@ -46,7 +55,7 @@ function caricadati(){
// Corpo tabella
const tbody = document.createElement('tbody');
item.forEach(item => {
item.stops.forEach(item => {
const element = item;
var tr = document.createElement('tr');
tr.innerHTML = `

View File

@@ -21,6 +21,7 @@
</header>
<h2>Lista fermate linea: <span id="codice-span"></span></h2>
<p>Direzione: <span id="destinazione-span"></span></p>
<p id="esiste-p"></p>
<p>E' possibile cliccare sul codice o nome fermata per vedere gli arrivi alla rispettiva fermata.</p>
<div id="tabella-container">Caricamento dati...</div>
<footer>