Upload files to "arrivals"

This commit is contained in:
Vichingo455 2024-12-20 12:07:35 +00:00
parent ee25a4b87b
commit a7e4d0f56f
12 changed files with 289 additions and 0 deletions

BIN
arrivals/american.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

9
arrivals/clock.js Normal file
View File

@ -0,0 +1,9 @@
function updateTime() {
const timeElement = document.getElementById('time');
const now = new Date();
const hours = String(now.getHours()).padStart(2, '0');
const minutes = String(now.getMinutes()).padStart(2, '0');
timeElement.textContent = `${hours}:${minutes}`;
}
setInterval(updateTime, 1000);
updateTime();

BIN
arrivals/emirates.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

120
arrivals/ercss.css Normal file
View File

@ -0,0 +1,120 @@
body {
margin: 0px;
background-color: #241571;
}
h1.maintxt{
font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
display: inline;
font-size: 48px;
padding-left: 10px;
}
.header{
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px;
}
#italian{
color:aliceblue;
font-weight: bolder;
}
#time{
text-align: right;
color: aliceblue;
margin-left: auto;
}
#english{
color: gold;
font-weight: lighter;
}
.arr_logo{
display: inline-block;
background-color: aliceblue;
border-radius: 4px;
}
.arr_logo img{
display: block;
}
.separator{
border: none;
border-top: 5px solid #151e3d;
margin: 0px 0;
width: 100%;
margin-left: auto;
margin-right: auto;
}
table{
border-collapse: collapse;
width: 100%;
}
th, td{
padding: 8px;
text-align: left;
border-bottom: 3px;
}
th{
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
font-weight: bold;
color: aliceblue;
font-size: 24px;
}
tr.one{
background-color: #151e3d;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
font-weight: lighter;
color: aliceblue;
font-size: 24px;
}
tr.two{
background-color: #241571;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
font-weight: lighter;
color: aliceblue;
font-size: 24px;
}
.airline{
display: inline-block;
margin-bottom: -6px;
}
.ok{
width: 24px;
height: 24px;
background-color: lime;
border-radius: 50%;
display: inline-block;
margin-bottom: -3px;
margin-left: 10px;
}
.late{
width: 24px;
height: 24px;
background-color: yellow;
border-radius: 50%;
display: inline-block;
margin-bottom: -3px;
margin-left: 10px;
}
.verylate{
width: 24px;
height: 24px;
background-color: red;
border-radius: 50%;
display: inline-block;
margin-bottom: -3px;
margin-left: 10px;
}

34
arrivals/flightdata.js Normal file
View File

@ -0,0 +1,34 @@
window.onload = function() {
startUpdating();
}
function startUpdating() {
setInterval(updateTableData, 1000);
}
function updateTableData() {
const url = 'https://enriifr.github.io/arrivalscreen/flights.txt';
const cacheBuster = `?v=${new Date().getTime()}`;
const fetchUrl = url + cacheBuster;
fetch(fetchUrl)
.then(response => response.text())
.then(data => {
const dataLines = data.split('\n');
for (let i = 0; i < 10; i++) {
const flightIndex = i*5; // Each flight has 5 lines of data in the text file
// Update text content for each flight (assuming data is structured in blocks of 5 lines per flight)
document.getElementById(`flight${i + 1}data1`).textContent = dataLines[flightIndex];
document.getElementById(`flight${i + 1}data2`).textContent = dataLines[flightIndex + 2];
document.getElementById(`flight${i + 1}data3`).textContent = dataLines[flightIndex + 3];
document.getElementById(`flight${i + 1}data4`).textContent = dataLines[flightIndex + 4];
// Update image source for each flight
document.getElementById(`flight${i + 1}airline`).src = dataLines[flightIndex + 1];
}
})
.catch(error => console.error('Error loading text:', error));
}

5
arrivals/flights.txt Normal file
View File

@ -0,0 +1,5 @@
13:33
RYANAIR.PNG
FR 7266
BOLOGNA
VICHI MANUEL ON BOARD

BIN
arrivals/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 871 B

102
arrivals/index.html Normal file
View File

@ -0,0 +1,102 @@
<!DOCTYPE html>
<html>
<head>
<title>LIPE Arrivals</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="oscript.js"></script>
<script src="clock.js"></script>
<script src="flightdata.js"></script>
<link rel="stylesheet" href="ercss.css">
<link type="image/png" sizes="96x96" rel="icon" href="icon.png">
</head>
<body>
<div class="header">
<div class="arr_logo">
<img src="icon.png" alt="Arrivals Icon" class="maintxt" width="50" height="50">
</div>
<h1 class="maintxt" id="italian">Arrivi</h1>
<h1 class="maintxt" id="english">Arrivals</h1>
<h1 class="maintxt" id="time"></h1>
</div>
<hr class="separator">
<table>
<tr>
<th id="header1">---</th>
<th id="header">---</th>
<th id="header4">---</th>
<th id="header5">---</th>
<th id="header6">---</th>
</tr>
<tr class="one">
<td id="flight1data1"></td>
<td id="flight1"><img src="" height="30px" class="airline" id="flight1airline" alt=""></td>
<td id="flight1data2"></td>
<td id="flight1data3"></td>
<td id="flight1data4"></td>
</tr>
<tr class="two">
<td id="flight2data1"></td>
<td id="flight2"><img src="" height="30px" class="airline" id="flight2airline" alt=""></td>
<td id="flight2data2"></td>
<td id="flight2data3"></td>
<td id="flight2data4"></td>
</tr>
<tr class="one">
<td id="flight3data1"></td>
<td id="flight3"><img src="" height="30px" class="airline" id="flight3airline" alt=""></td>
<td id="flight3data2"></td>
<td id="flight3data3"></td>
<td id="flight3data4"></td>
</tr>
<tr class="two">
<td id="flight4data1"></td>
<td id="flight4"><img src="" height="30px" class="airline" id="flight4airline" alt=""></td>
<td id="flight4data2"></td>
<td id="flight4data3"></td>
<td id="flight4data4"></td>
</tr>
<tr class="one">
<td id="flight5data1"></td>
<td id="flight5"><img src="" height="30px" class="airline" id="flight5airline" alt=""></td>
<td id="flight5data2"></td>
<td id="flight5data3"></td>
<td id="flight5data4"></td>
</tr>
<tr class="two">
<td id="flight6data1"></td>
<td id="flight6"><img src="" height="30px" class="airline" id="flight6airline" alt=""></td>
<td id="flight6data2"></td>
<td id="flight6data3"></td>
<td id="flight6data4"></td>
</tr>
<tr class="one">
<td id="flight7data1"></td>
<td id="flight7"><img src="" height="30px" class="airline" id="flight7airline" alt=""></td>
<td id="flight7data2"></td>
<td id="flight7data3"></td>
<td id="flight7data4"></td>
</tr>
<tr class="two">
<td id="flight8data1"></td>
<td id="flight8"><img src="" height="30px" class="airline" id="flight8airline" alt=""></td>
<td id="flight8data2"></td>
<td id="flight8data3"></td>
<td id="flight8data4"></td>
</tr>
<tr class="one">
<td id="flight9data1"></td>
<td id="flight9"><img src="" height="30px" class="airline" id="flight9airline" alt=""></td>
<td id="flight9data2"></td>
<td id="flight9data3"></td>
<td id="flight9data4"></td>
</tr>
<tr class="two">
<td id="flight10data1"></td>
<td id="flight10"><img src="" height="30px" class="airline" id="flight10airline" alt=""></td>
<td id="flight10data2"></td>
<td id="flight10data3"></td>
<td id="flight10data4"></td>
</tr>
</table>
</body>
</html>

BIN
arrivals/ita.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

19
arrivals/oscript.js Normal file
View File

@ -0,0 +1,19 @@
document.addEventListener('DOMContentLoaded', () => {
const headers = document.querySelectorAll('th');
const headerTexts = [
["Orario", "Time"],
["Compagnia", "Airline"],
["# Volo", "Flight #"],
["Provenienza", "Origin"],
["Informazioni", "Status"]
];
let index = 0;
setInterval(() => {
headers.forEach((header, i) => {
header.textContent = headerTexts[i][index % headerTexts[i].length];
});
index++;
}, 10000);
});

BIN
arrivals/ryanair.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

BIN
arrivals/wizzair.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB