Compare commits

..

No commits in common. "fb9c7a4fcc35e84427102b6626c7a3e03aa8b843" and "d2ba491675c807f425bc4ab68e65aa4381a9762d" have entirely different histories.

6 changed files with 12 additions and 29 deletions

View File

@ -4,8 +4,6 @@ RUN npm i uglifyjs-folder uglifycss html-minifier-terser -g
COPY . /data/in COPY . /data/in
RUN bash /data/in/conf/deploy.sh RUN bash /data/in/conf/deploy.sh
## Maybe use: georgjung/nginx-brotli:mainline-alpine
## Instead?
FROM fholzer/nginx-brotli:latest FROM fholzer/nginx-brotli:latest
RUN rm /etc/nginx/nginx.conf RUN rm /etc/nginx/nginx.conf
RUN apk update && apk add --upgrade libxml2 libxslt RUN apk update && apk add --upgrade libxml2 libxslt

View File

@ -1,9 +1,6 @@
user nginx; user nginx;
worker_processes 1; worker_processes 1;
##load_module modules/ngx_http_brotli_static_module.so;
# Required to load module if using the newer image
error_log /var/log/nginx/error.log notice; error_log /var/log/nginx/error.log notice;
pid /var/run/nginx.pid; pid /var/run/nginx.pid;

View File

@ -1,6 +1,6 @@
/* eslint-disable no-unused-vars */ /* eslint-disable no-unused-vars */
/* All Page Init */ /* All Page Init */
const version = '2023.6.4' const version = '2023.6.1'
/* Feature Detectors */ /* Feature Detectors */

View File

@ -78,41 +78,29 @@ async function displayOne(object) {
for (const stop of publicStops) { for (const stop of publicStops) {
stopRows += await createPublicStopTableRow(stop) stopRows += await createPublicStopTableRow(stop)
} }
// If there are no public stops, show non-public locations
if (!publicStops.length) {
for (const stop of object['stops']) {
stopRows += await createPublicStopTableRow(stop, 'wtt')
}
}
const displayBox = document.getElementById('train_data') const displayBox = document.getElementById('train_data')
displayBox.innerHTML = '' displayBox.innerHTML = ''
displayBox.insertAdjacentHTML('beforeend', dataTableHead + stopRows + dataTableClose) displayBox.insertAdjacentHTML('beforeend', dataTableHead + stopRows + dataTableClose)
displayBox.style = 'display:block;' displayBox.style = 'display:block;'
} }
async function createPublicStopTableRow(stop, type='public') { async function createPublicStopTableRow(stop) {
let arr, dep let data_tiploc = stop['tiploc'], public_arr = stop['publicArrival'],
let data_tiploc = stop['tiploc'] public_dep = stop['publicDeparture']
if (type === 'wtt') {
arr = stop['wttArrival'], dep = stop['wttDeparture']
}
if (type === 'public') {
arr = stop['publicArrival'], dep = stop['publicDeparture']
}
if (typeof data_tiploc === 'undefined') { if (typeof data_tiploc === 'undefined') {
data_tiploc = '' data_tiploc = ''
} }
if (typeof arr === 'undefined') { if (typeof public_arr === 'undefined') {
arr = '-' public_arr = '-'
} }
if (typeof dep === 'undefined') { if (typeof public_dep === 'undefined') {
dep = '-' public_dep = '-'
} }
return ` return `
<tr> <tr>
<td id='data_tiploc'>${data_tiploc}</td> <td id='data_tiploc'>${data_tiploc}</td>
<td id='public_arr'>${arr}</td> <td id='public_arr'>${public_arr}</td>
<td id='public_dep'>${dep}</td> <td id='public_dep'>${public_dep}</td>
</tr> </tr>
` `
} }

View File

@ -49,7 +49,7 @@
<form action="javascript:findByHeadcode();"> <form action="javascript:findByHeadcode();">
<div id="crs-inputs"> <div id="crs-inputs">
<div class="crs-input"> <div class="crs-input">
<label for="pis">Headcode:</label><br> <label for="pis">PIS Code:</label><br>
<input type="text" class="small-lookup-box pis-input" id="headcode" name="headcode" maxlength="4" autocomplete="off"><br><br> <input type="text" class="small-lookup-box pis-input" id="headcode" name="headcode" maxlength="4" autocomplete="off"><br><br>
</div> </div>
</div> </div>

2
sw.js
View File

@ -1,6 +1,6 @@
/* Service Worker */ /* Service Worker */
const swVersion = '2023.6.4-1' const swVersion = '2023.6.1-1'
const cacheName = `owlboard-${swVersion}` const cacheName = `owlboard-${swVersion}`
const cacheIDs = [cacheName] const cacheIDs = [cacheName]
let staticCache = [ let staticCache = [