Nuova grafica start monitor bus

This commit is contained in:
Leocraft1
2025-09-28 17:31:39 +02:00
parent 5d834093be
commit 6654addeaa
3 changed files with 59 additions and 54 deletions

View File

@@ -45,7 +45,8 @@
<div class="riga">
<h2 class="piccolospazio">Ravenna:</h2>
<p class="piccolospazio">
Aggiunti: <a class="novita" href="/startravenna_bus/urbano/manlc12e.html">MAN Lion's City 12E</a>.
Aggiunti: <a class="novita" href="/startravenna_bus/urbano/manlc12e.html">MAN Lion's City 12E</a>. <br> <br>
Nuova grafica per il <a class="novita" href="/start_menu/servizi/start-livebus/index.html">Monitor bus</a>.
</p>
</div>
<div class="riga">

View File

@@ -22,15 +22,8 @@ p {
}
#data-container {
margin-top: 20px;
max-width: 1000px;
margin-left: auto;
margin-right: auto;
background-color: #333;
padding: 20px;
border-radius: 12px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
overflow-x: scroll;
min-width: 80%;
max-width: 100%;
}
.filter-container {
@@ -69,52 +62,46 @@ p {
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
font-size: 15px;
border-radius: 8px;
border-collapse: separate;
border-spacing: 0;
border: 1px solid #444;
border-radius: 16px;
overflow: hidden;
min-width: 85%;
max-width: 100%;
margin: 18px auto;
}
table th:nth-child(6),
td:nth-child(6){
display: none;
/*Linee verticali*/
th:not(:last-child),
td:not(:last-child) {
border-right: 1px solid #444;
}
table,
th,
td {
border: 1px solid #e0e0e0;
/*Linee orizzontali*/
tr:not(:last-child) > th,
tr:not(:last-child) > td {
border-bottom: 1px solid #444;
}
th {
background-color: slategray;
color: white;
padding: 12px;
text-align: left;
text-align: center;
padding: .7vw;
}
td {
padding: 10px;
background-color: dimgray;
padding: .7vw;
background-color: #282828;
color: white;
}
tr:nth-child(even) td {
background-color: gray;
}
tr:hover td {
background-color: darkgray;
background-color: rgb(60, 60, 60);
}
@media (max-width: 768px) {
table th:nth-child(4),
td:nth-child(4){
display: none;
}
.filter-container input{
margin-top: 5px;
}
@@ -122,6 +109,9 @@ tr:hover td {
.filter-container button{
margin-top: 75%;
}
#data-container {
overflow-x: scroll;
}
}
button {

View File

@@ -42,24 +42,38 @@ function applyFilter() {
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';
var th = document.createElement('th');
var tr = document.createElement('tr');
th.innerHTML='Zona';
tr.appendChild(th);
th = document.createElement('th');
th.innerHTML='Linea';
tr.appendChild(th);
th = document.createElement('th');
th.innerHTML='Fermata';
tr.appendChild(th);
th = document.createElement('th');
th.innerHTML='Codice fermata';
tr.appendChild(th);
th = document.createElement('th');
th.innerHTML='Veicolo';
tr.appendChild(th);
th = document.createElement('th');
th.innerHTML='Ultimo aggiornamento';
tr.appendChild(th);
table.appendChild(tr);
// Aggiungi i dati alla tabella
const tbody = table.createTBody();
data.forEach(row => {
const rowElement = tbody.insertRow();
const rowt = document.createElement('tr');
row.forEach(cellData => {
const cell = rowElement.insertCell();
cell.textContent = cellData;
if(cellData!=""){
const cell = document.createElement('td');
cell.innerHTML = cellData;
rowt.appendChild(cell);
}
});
table.appendChild(rowt);
});
// Aggiungi la tabella alla pagina