Lint fixes, expand help, deep links

This commit is contained in:
Fred Boniface 2023-05-08 21:06:48 +01:00
parent 15fa5823e6
commit 7e89447816
6 changed files with 49 additions and 39 deletions

View File

@ -111,7 +111,7 @@
<div id="error_notice" class="main-notice hide-when-loading"> <div id="error_notice" class="main-notice hide-when-loading">
<h1 class="error">Oops</h1> <h1 class="error">Oops</h1>
<p class="error">There was an error with your request</p> <p class="error">There was an error with your request</p>
<p id="err_not_auth" class="notices-hidden">You are not authorised to view staff versions, you can sign up in <a href="./settings.html">settings</a></p> <p id="err_not_auth" class="notices-hidden">You are not authorised to view staff versions, you can sign up in <a href="./settings.html#railstaff">settings</a></p>
<p id="err_not_found" class="notices-hidden">The station you are searching for cannot be found</p> <p id="err_not_found" class="notices-hidden">The station you are searching for cannot be found</p>
<p id="err_no_data" class="notices-hidden">The station has no data. It may not be in operation yet/anymore.</p> <p id="err_no_data" class="notices-hidden">The station has no data. It may not be in operation yet/anymore.</p>
<p id="err_conn" class="notices-hidden">Connection Error, check your data connection. Retrying.</p> <p id="err_conn" class="notices-hidden">Connection Error, check your data connection. Retrying.</p>

View File

@ -1,18 +1,18 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"/> <meta charset="UTF-8">
<meta name="description" content="OwlBoard - How to use OwlBoard."/> <meta name="description" content="OwlBoard - How to use OwlBoard.">
<meta name="robots" content="noindex"/> <meta name="robots" content="noindex">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="application-name" content="OwlBoard"> <meta name="application-name" content="OwlBoard">
<meta name="author" content="Frederick Boniface"> <meta name="author" content="Frederick Boniface">
<meta name="theme-color" content="#00b7b7"> <meta name="theme-color" content="#00b7b7">
<link rel="apple-touch-icon" href="/images/app-icons/any/apple-192.png"> <link rel="apple-touch-icon" href="./images/app-icons/any/apple-192.png">
<link rel="stylesheet" type="text/css" href="./styles/main.css"/> <link rel="stylesheet" type="text/css" href="./styles/main.css">
<link rel="stylesheet" type="text/css" href="./styles/help.css"/> <link rel="stylesheet" type="text/css" href="./styles/help.css">
<link rel="icon" type="image/svg+xml" href="./images/icon.svg"/> <link rel="icon" type="image/svg+xml" href="./images/icon.svg">
<link rel="manifest" type="application/json" href="./manifest.json"/> <link rel="manifest" type="application/json" href="./manifest.json">
<!-- NO SCRIPTS LOADED - NOT REQUIRED AT PRESENT --> <!-- NO SCRIPTS LOADED - NOT REQUIRED AT PRESENT -->
<title>OwlBoard</title> <title>OwlBoard</title>
</head> </head>
@ -20,41 +20,47 @@
<body> <body>
<div id="top_button" class="hide_micro"> <div id="top_button" class="hide_micro">
<a href="/"> <a href="./">
<picture aria-label="Home" class="sidebar_control"> <picture class="sidebar_control">
<source srcset="/images/nav/back.svg" type="image/svg+xml"> <source srcset="./images/nav/back.svg" type="image/svg+xml">
<img src="back-40.png" alt="Home"> <img aria-label="Home" src="./images/nav/back-40.png" alt="Home">
</picture> </picture>
</a> </a>
</div> </div>
<picture> <picture>
<source srcset="/images/logo/wide_logo.svg" type="image/svg+xml"> <source srcset="/images/logo/wide_logo.svg" type="image/svg+xml">
<source media="(max-height: 739px)" srcset="/images/logo/logo-full-200.png" type="image/png"> <source media="(max-height: 739px)" srcset="./images/logo/logo-full-200.png" type="image/png">
<source srcset="/images/logo/logo-full-250.png" type="image/png"> <source srcset="./images/logo/logo-full-250.png" type="image/png">
<img class="titleimg" src="/images/logo/logo-full-250.png" alt="OwlBoard Logo"> <img class="titleimg" src="./images/logo/logo-full-250.png" alt="OwlBoard Logo">
</picture> </picture>
<h2>Help</h2> <h2>Help</h2>
<p>OwlBoard gives you quick and easy access to departure boards for <p>OwlBoard gives you quick and easy access to departure boards for
all National Rail stations in the UK.</p> all National Rail stations in the UK. It replaces <a href="https://athena.fb-infra.uk">Athena</a>
<p>Just type a CRS, TIPLOC or STANOX into the textbox on the homepage and tap and adds location reference codes, PIS code lookups and gives faster access to departure boards.</p>
<p>Just type a CRS, TIPLOC or STANOX into the textbox on the homepage and tap
enter on the screen or your keypad. You can also select a differnt board type, enter on the screen or your keypad. You can also select a differnt board type,
more details on your choices below.</p> more details on your choices below.</p>
<p>For example, Portway Park & <p>For example, Portway Park &amp; Ride's CRS is 'PRI', and its TIPLOC is 'PTWYPR';
Ride's CRS is 'PRI', and its TIPLOC is 'PTWYPR'; Portsmouth Harbour's Portsmouth Harbour's CRS is 'PMH', and its TIPLOC is 'PHBR'.</p>
CRS is 'PMH', and its TIPLOC is 'PHBR'.</p> <p>A CRS is always three letters, a TIPLOC can be between 4-7 letters or numbers.</p>
<p>A CRS is always three letters,
a TIPLOC can be between 4-7 letters.</p>
<br> <br>
<h3>Don't know the CRS or TIPLOC?</h3> <h3>Don't know the CRS or TIPLOC?</h3>
<p>Sorry, you can't search by name but you can use our <a href="find-code.html"> <p>Sorry, you can't search by name but you can use our <a href="./find-code.html">
Code Lookup</a> page to help.</p> Code Lookup</a> page to help.</p>
<h3>Board Types</h3> <h3>Board Types</h3>
<h4>Basic Board - Default</h4> <h4>Basic Board - Default</h4>
<p>The basic board shows the next 10 train arrival and departures, as well as <p>The basic board shows the next 10 train arrival and departures, as well as
bus and ferry departures where available.</p> bus and ferry departures where available.</p>
<p>You can tap on a trains origin or destination to see service details.</p> <p>You can tap on a trains origin or destination to see service details.</p>
<br> <br>
<h3>PIS Lookup</h3>
<p>PIS Codes are used on-train to tell the PIS system the stopping patter of the
service. Some systems allow you to enter the headcode and will then load the
stops, but others require a code to be input into the system.</p>
<p>Once you are logged in to the <a href="./settings.html#railstaff">Rail Staff
Version</a> of OwlBoard you can lookup PIS Codes by typing in the CRS code of
the first and last stop of your service. Lookup by headcode is being worked on.</p>
<h3>Glossary</h3> <h3>Glossary</h3>
<p>Some of the terms may be new to you or different from those commonly used.</p> <p>Some of the terms may be new to you or different from those commonly used.</p>
<table id="table"> <table id="table">
@ -72,7 +78,7 @@
</tr> </tr>
<tr> <tr>
<td>NLC</td> <td>NLC</td>
<td>National Location Code - Used for finance & accounting</td> <td>National Location Code - Used for finance &amp; accounting</td>
</tr> </tr>
<tr> <tr>
<td>RT</td> <td>RT</td>
@ -86,6 +92,10 @@
<td>TIPLOC</td> <td>TIPLOC</td>
<td>Timing Point Location (Name)</td> <td>Timing Point Location (Name)</td>
</tr> </tr>
<tr>
<td>PIS</td>
<td>Passenger Information System (or Passenger Information Screems)</td>
</tr>
</table> </table>
<br> <br>
<h3>Spotted an issue with the site?</h3> <h3>Spotted an issue with the site?</h3>

View File

@ -1,5 +1,5 @@
/* All Page Init */ /* All Page Init */
const version = '2.0.1' const version = '2.0.2'
/* Feature Detectors */ /* Feature Detectors */

View File

@ -7,7 +7,7 @@
<meta name="application-name" content="OwlBoard"> <meta name="application-name" content="OwlBoard">
<meta name="author" content="Frederick Boniface"> <meta name="author" content="Frederick Boniface">
<meta name="theme-color" content="#00b7b7"> <meta name="theme-color" content="#00b7b7">
<link rel="apple-touch-icon" href="/images/app-icons/any/apple-192.png"> <link rel="apple-touch-icon" href="./images/app-icons/any/apple-192.png">
<link rel="stylesheet" type="text/css" href="./styles/main.css"> <link rel="stylesheet" type="text/css" href="./styles/main.css">
<link rel="stylesheet" type="text/css" href="./styles/pis.css"> <link rel="stylesheet" type="text/css" href="./styles/pis.css">
<link rel="icon" type="image/svg+xml" href="./images/icon.svg"> <link rel="icon" type="image/svg+xml" href="./images/icon.svg">
@ -20,10 +20,10 @@
<body> <body>
<div id="top_button" class="hide_micro"> <div id="top_button" class="hide_micro">
<a href="/"> <a href="./">
<picture aria-label="Home" class="sidebar_control"> <picture class="sidebar_control">
<source srcset="/images/nav/back.svg" type="image/svg+xml"> <source srcset="./images/nav/back.svg" type="image/svg+xml">
<img src="back-40.png" alt="Home"> <img aria-label="Home" src="./images/nav/back-40.png" alt="Home">
</picture> </picture>
</a> </a>
</div> </div>
@ -45,7 +45,7 @@
<div id="crs-box"> <div id="crs-box">
<p>Enter a services start and end station CRS codes to see code options and stopping patterns.</p> <p>Enter a services start and end station CRS codes to see code options and stopping patterns.</p>
<p>Currently supported (Beta): GWR: Up/Dn SVB-EXD, Dn CDF-PNZ, Up/Dn GMV/CDF-PMH, Up/Dn GMV-CDF/SOU via Kemble, HEx<br>Duplicate stopping patterns have been removed.</p> <p>Currently supported (Beta): GWR: Up/Dn SVB-EXD, Dn CDF-PNZ, Up/Dn GMV/CDF-PMH, Up/Dn GMV-CDF/SOU via Kemble, HEx<br>Duplicate stopping patterns have been removed.</p>
<p id="auth-required">You need to be logged into a free <a href="./settings.html">rail staff version</a> account for this feature.</p> <p id="auth-required">You need to be logged into a free <a href="./settings.html#railstaff">rail staff version</a> account for this feature.</p>
<form action="javascript:findByOrigDest();"> <form action="javascript:findByOrigDest();">
<div id="crs-inputs"> <div id="crs-inputs">
<div class="crs-input"> <div class="crs-input">
@ -70,7 +70,7 @@
<button type="reset" id="reset" class="lookup-button" onclick="reset()">Reset</button> <button type="reset" id="reset" class="lookup-button" onclick="reset()">Reset</button>
<!-- Footer --> <!-- Footer -->
<footer> <footer>
<p>Created by <a href="https://fredboniface.co.uk" target="_blank" rel="noreferrer noopener">Fred Boniface</a> - <span id="ver_str">d</span></p> <p>Created by <a href="https://fredboniface.co.uk" target="_blank" rel="noreferrer noopener">Fred Boniface</a> - <span id="ver_str"></span></p>
</footer> </footer>
</body> </body>
</html> </html>

View File

@ -36,9 +36,9 @@
<div id="top_button" class="hide_micro"> <div id="top_button" class="hide_micro">
<a href="/"> <a href="/">
<picture aria-label="Home" class="sidebar_control"> <picture class="sidebar_control">
<source srcset="/images/nav/back.svg" type="image/svg+xml"> <source srcset="/images/nav/back.svg" type="image/svg+xml">
<img src="back-40.png" alt="Home"> <img aria-label="Home" src="back-40.png" alt="Home">
</picture> </picture>
</a> </a>
</div> </div>
@ -69,7 +69,7 @@
<button type="submit" onclick="setQl()" class="lookup-button">Apply</button> <button type="submit" onclick="setQl()" class="lookup-button">Apply</button>
<button type="reset" onclick="clearQl()" class="lookup-button">Defaults</button> <button type="reset" onclick="clearQl()" class="lookup-button">Defaults</button>
<br><br><br> <br><br><br>
<label>Register for Rail Staff Version:</label> <label id="railstaff">Register for Rail Staff Version:</label>
<p id="reg_text">Enter your work email address:</p> <p id="reg_text">Enter your work email address:</p>
<input type="text" maxlength="128" id="eml" name="eml" autocomplete="email" class="lookup-box" placeholder="email"><br> <input type="text" maxlength="128" id="eml" name="eml" autocomplete="email" class="lookup-box" placeholder="email"><br>
<p>One registration confirmation email will be sent which will include more details about your account</p> <p>One registration confirmation email will be sent which will include more details about your account</p>

2
sw.js
View File

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