diff --git a/departures/american.png b/departures/american.png new file mode 100644 index 0000000..6e7112b Binary files /dev/null and b/departures/american.png differ diff --git a/departures/clock.js b/departures/clock.js new file mode 100644 index 0000000..33a4181 --- /dev/null +++ b/departures/clock.js @@ -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(); diff --git a/departures/emirates.png b/departures/emirates.png new file mode 100644 index 0000000..806d5cb Binary files /dev/null and b/departures/emirates.png differ diff --git a/departures/ercss.css b/departures/ercss.css new file mode 100644 index 0000000..3ad5e74 --- /dev/null +++ b/departures/ercss.css @@ -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; +} \ No newline at end of file diff --git a/departures/flightdata.js b/departures/flightdata.js new file mode 100644 index 0000000..4484d0e --- /dev/null +++ b/departures/flightdata.js @@ -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)); + } + \ No newline at end of file diff --git a/departures/flights.txt b/departures/flights.txt new file mode 100644 index 0000000..39e4c1a --- /dev/null +++ b/departures/flights.txt @@ -0,0 +1,5 @@ +13:33 +RYANAIR.PNG +FR 7266 +BOLOGNA +VICHI MANUEL ON BOARD \ No newline at end of file diff --git a/departures/icon.png b/departures/icon.png new file mode 100644 index 0000000..f86ed32 Binary files /dev/null and b/departures/icon.png differ diff --git a/departures/index.html b/departures/index.html new file mode 100644 index 0000000..6f45cea --- /dev/null +++ b/departures/index.html @@ -0,0 +1,102 @@ + + + + LIPE Arrivals + + + + + + + + +
+ +

Partenze

+

Departures

+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
---------------
+ + \ No newline at end of file diff --git a/departures/ita.png b/departures/ita.png new file mode 100644 index 0000000..a168074 Binary files /dev/null and b/departures/ita.png differ diff --git a/departures/oscript.js b/departures/oscript.js new file mode 100644 index 0000000..d4d890f --- /dev/null +++ b/departures/oscript.js @@ -0,0 +1,19 @@ +document.addEventListener('DOMContentLoaded', () => { + const headers = document.querySelectorAll('th'); + const headerTexts = [ + ["Orario", "Time"], + ["Compagnia", "Airline"], + ["# Volo", "Flight #"], + ["Destinazione", "Destination"], + ["Informazioni", "Status"] + ]; + + let index = 0; + + setInterval(() => { + headers.forEach((header, i) => { + header.textContent = headerTexts[i][index % headerTexts[i].length]; + }); + index++; + }, 10000); +}); \ No newline at end of file diff --git a/departures/ryanair.png b/departures/ryanair.png new file mode 100644 index 0000000..c41935f Binary files /dev/null and b/departures/ryanair.png differ diff --git a/departures/wizzair.png b/departures/wizzair.png new file mode 100644 index 0000000..c4f8ab3 Binary files /dev/null and b/departures/wizzair.png differ