Compare commits

..

No commits in common. "6795809098673a4355bc9fc3173eccc759b74b61" and "c61a8e9ff0ccdcd5504b12d7d5f1e6d5f4f88a61" have entirely different histories.

9 changed files with 105 additions and 155 deletions

View File

@ -7,7 +7,7 @@ RUN npm install
COPY . ./ COPY . ./
RUN npm run build RUN npm run build
FROM georgjung/nginx-brotli:mainline-alpine FROM nginx:alpine-slim
RUN rm -f /etc/nginx/nginx.conf RUN rm -f /etc/nginx/nginx.conf
COPY ./nginx.conf /etc/nginx/nginx.conf COPY ./nginx.conf /etc/nginx/nginx.conf
COPY --from=build /app/build /usr/share/nginx/html COPY --from=build /app/build /usr/share/nginx/html

View File

@ -1,5 +1,3 @@
load_module modules/ngx_http_brotli_static_module.so;
user nginx; user nginx;
worker_processes auto; worker_processes auto;
@ -46,7 +44,6 @@ http {
root /usr/share/nginx/html; root /usr/share/nginx/html;
index index.html; index index.html;
gzip_static on; gzip_static on;
brotli_static on;
error_page 500 502 503 504 /50x.html; error_page 500 502 503 504 /50x.html;
try_files $uri $uri.html $uri/ =404; try_files $uri $uri.html $uri/ =404;
add_header Cache-Control "public, no-transform, max-age=1209600"; add_header Cache-Control "public, no-transform, max-age=1209600";

View File

@ -28,8 +28,7 @@
@font-face { @font-face {
font-family: 'ubuntu'; font-family: 'ubuntu';
src: url('/font/ubuntumono/ubuntumono-regular.woff2') format('woff2'), url('/font/ubuntumono/ubuntumono-regular.woff') format('woff'), src: url('/font/ubuntumono/ubuntumono-regular.woff2') format('woff2'), url('/font/ubuntumono/ubuntumono-refular.woff') format('woff'), url('/font/ubuntumono/ubuntumono-regular.ttf') format('truetype');
url('/font/ubuntumono/ubuntumono-regular.ttf') format('truetype');
font-weight: 400; font-weight: 400;
font-style: normal; font-style: normal;
} }

View File

@ -150,7 +150,6 @@
click(rid, uid, tid); click(rid, uid, tid);
} }
</script> </script>
<p class="smallScreen">Your display is too small to view this data</p> <p class="smallScreen">Your display is too small to view this data</p>
<table> <table>
<tr> <tr>
@ -180,13 +179,10 @@
<td class="id">{service.trainid}</td> <td class="id">{service.trainid}</td>
<td class="from {serviceData.isNonPublic && 'nonPass'} {serviceData.isCancelled && 'cancTxt'}">{serviceData.from}</td> <td class="from {serviceData.isNonPublic && 'nonPass'} {serviceData.isCancelled && 'cancTxt'}">{serviceData.from}</td>
<td class="to {serviceData.isNonPublic && 'nonPass'} {serviceData.isCancelled && 'cancTxt'}">{serviceData.to}</td> <td class="to {serviceData.isNonPublic && 'nonPass'} {serviceData.isCancelled && 'cancTxt'}">{serviceData.to}</td>
<td class="plat {serviceData.isNonPublic && 'nonPass'} {serviceData.isCancelled && 'cancTxt'} {serviceData.platformHidden && 'nonPass'}" <td class="plat {serviceData.isNonPublic && 'nonPass'} {serviceData.isCancelled && 'cancTxt'} {serviceData.platformHidden && 'nonPass'}">{serviceData.platform.number || '-'}</td>
>{serviceData.platform.number || '-'}</td
>
<td class="time schTime {serviceData.isNonPublic && 'nonPass'} {serviceData.isCancelled && 'cancTxt'}">{serviceData.schArr}</td> <td class="time schTime {serviceData.isNonPublic && 'nonPass'} {serviceData.isCancelled && 'cancTxt'}">{serviceData.schArr}</td>
<td <td class="time {serviceData.isNonPublic && 'nonPass'} {serviceData.isLateArr && 'late'} {serviceData.isArrDelayed && 'late'} {serviceData.isCancelled && 'canc'} {serviceData.isEarlyArr && 'early'}"
class="time {serviceData.isNonPublic && 'nonPass'} {serviceData.isLateArr && 'late'} {serviceData.isArrDelayed && 'late'} {serviceData.isCancelled && >{serviceData.isArrDelayed ? 'LATE' : serviceData.expArr}</td
'canc'} {serviceData.isEarlyArr && 'early'}">{serviceData.isArrDelayed ? 'LATE' : serviceData.expArr}</td
> >
<td class="time schTime {serviceData.isNonPublic && 'nonPass'} {serviceData.isCancelled && 'cancTxt'}">{serviceData.schDep}</td> <td class="time schTime {serviceData.isNonPublic && 'nonPass'} {serviceData.isCancelled && 'cancTxt'}">{serviceData.schDep}</td>
<td <td
@ -196,8 +192,7 @@
</tr> </tr>
<tr> <tr>
<td class="tableTxt" colspan="8"> <td class="tableTxt" colspan="8">
{service.operator} {service.operator} {#if service.isCharter}charter{/if}
{#if service.isCharter}charter{/if}
{#if serviceData.length} | {serviceData.length} carriages{/if} {#if serviceData.length} | {serviceData.length} carriages{/if}
{#if service.delayReason} {#if service.delayReason}
<br /> <br />
@ -221,8 +216,7 @@
table { table {
table-layout: fixed; table-layout: fixed;
width: 100%; width: 100%;
max-width: 875px; margin: 0px;
margin: auto;
padding: 0px; padding: 0px;
color: white; color: white;
} }
@ -264,14 +258,13 @@
td.from, td.from,
td.to { td.to {
color: yellow; color: yellow;
text-align: left;
} }
td.to, td.to, th.to {
th.to {
text-align: right; text-align: right;
} }
td.from, td.from, th.from {
th.from {
text-align: left; text-align: left;
} }
td.time { td.time {
@ -287,55 +280,27 @@
} }
/* Handle small screens */ /* Handle small screens */
.smallScreen { .smallScreen {display: none; margin: 20px;}
display: none;
margin: 20px;
}
@media screen and (max-width: 335px) { @media screen and (max-width: 335px) {
th { th {font-size: 10px;}
font-size: 10px; .dataRow {font-size: 12px;}
} td.time {font-size: 12px;}
.dataRow { .tableTxt{font-size:10px;}
font-size: 12px;
}
td.time {
font-size: 12px;
}
.tableTxt {
font-size: 10px;
}
} }
@media screen and (max-width: 279px) { @media screen and (max-width: 279px) {
table { table {display: none;}
display: none; .smallScreen {display: block;}
}
.smallScreen {
display: block;
}
} }
/* Handle Large Screens */ /* Handle Large Screens */
@media screen and (min-width: 375px) { @media screen and (min-width: 375px) {
.dataRow { .dataRow{font-size: 18px;}
font-size: 18px; td.time{font-size:16px;}
}
td.time {
font-size: 16px;
}
} }
@media screen and (min-width: 450px) { @media screen and (min-width: 450px) {
.dataRow { .dataRow{font-size:20px;}
font-size: 20px; td.time{font-size:19px;}
} .tableTxt{font-size:13px;}
td.time {
font-size: 19px;
}
.tableTxt {
font-size: 14px;
}
td.to,td.from,th.to,th.from {
text-align: center;
}
} }
/* Conditional Classes */ /* Conditional Classes */

View File

@ -123,9 +123,9 @@
<th class="tableLocation">Loc.</th> <th class="tableLocation">Loc.</th>
<th class="tablePlatform">Pl.</th> <th class="tablePlatform">Pl.</th>
<th class="tableTime">Sch</th> <th class="tableTime">Sch</th>
<th class="tableTime">Est/<br />Act</th> <th class="tableTime">Est/<br>Act</th>
<th class="tableTime">Sch</th> <th class="tableTime">Sch</th>
<th class="tableTime">Est/<br />Act</th> <th class="tableTime">Est/<br>Act</th>
<th class="tableDelay" /> <th class="tableDelay" />
</tr> </tr>
<tr> <tr>
@ -213,19 +213,13 @@
font-size: 16px; font-size: 16px;
} }
@media screen and (max-width: 338px) { @media screen and (max-width: 338px) {
#detailTable { #detailTable{font-size: 14px}
font-size: 14px;
}
} }
@media screen and (max-width: 301px) { @media screen and (max-width: 301px) {
#detailTable { #detailTable{font-size: 12px}
font-size: 12px;
}
} }
@media screen and (min-width: 469px) { @media screen and (min-width: 469px) {
#detailTable { #detailTable{font-size: 20px}
font-size: 20px;
}
} }
.tableLocation { .tableLocation {
width: 18%; width: 18%;
@ -234,10 +228,10 @@
color: yellow; color: yellow;
} }
.tablePlatform { .tablePlatform {
width: 9%; width: 5%;
} }
.tableTime { .tableTime {
width: 14%; width: 15%;
} }
.tableDelay { .tableDelay {
width: 7%; width: 7%;

View File

@ -1,3 +1,3 @@
export const version = '2023.7.1'; export const version = '2023.7.1';
export const versionTag = 'beta.3'; export const versionTag = 'beta.2';
export const showWelcome = true; export const showWelcome = true;

View File

@ -9,8 +9,7 @@
isExpanded = !isExpanded; isExpanded = !isExpanded;
} }
</script> </script>
<!-- The next version of backend will only return a subset of information required to display the container-header
, the container will then be responsible for fetching more data using the trainUid. -->
<div class="container"> <div class="container">
<div class="container-header" on:click={expand} on:keypress={expand}> <div class="container-header" on:click={expand} on:keypress={expand}>
<span class="header" <span class="header"

View File

@ -83,10 +83,7 @@
<p>There was an error processing your request.</p> <p>There was an error processing your request.</p>
<p>Check that the email you entered was correct or try again later.</p> <p>Check that the email you entered was correct or try again later.</p>
{:else if state == 'reg'} {:else if state == 'reg'}
<p> <p>You are already registered for OwlBoard. If you've recently logged out or updated, you may need to refresh this page to register as old data could still be stored in your browser.</p>
You are already registered for OwlBoard. If you've recently logged out or updated, you may need to refresh this page to register as old data could still be stored in your
browser.
</p>
{/if} {/if}
<Nav /> <Nav />

View File

@ -2,16 +2,15 @@
// This should then enable the new /service-worker.js to be installed // This should then enable the new /service-worker.js to be installed
self.addEventListener('activate', function (e) { self.addEventListener('activate', function (e) {
console.log(`Unregistering service worker`); console.log(`Unregistering service worker`)
self.registration self.registration.unregister()
.unregister()
.then(function () { .then(function () {
return self.clients.matchAll(); return self.clients.matchAll();
}) })
.then(function (clients) { .then(function (clients) {
clients.forEach((client) => { clients.forEach(client => {
console.log(`Navigating ${client.url}`); console.log(`Navigating ${client.url}`)
client.navigate(client.url); client.navigate(client.url)
}); })
}); });
}); });