Work on NRCC Notices

Signed-off-by: Fred Boniface <fred@fjla.uk>
This commit is contained in:
Fred Boniface 2023-01-12 22:15:38 +00:00
parent dbb9903fee
commit 9434d7e3a8
8 changed files with 27 additions and 8 deletions

View File

@ -1,6 +1,10 @@
# What to do next:
* Frontend - Implement scrolling NRCC Notices as they take up lots of space.
* Frontend - Implement paginated NRCC Notices as they take up lots of space.
- Either a carousel of multiple notices that auto-step, or an accordian.
- Carousel: https://www.section.io/engineering-education/how-to-make-an-image-carousel-for-your-website/
* Frontend - If Ferry Services Present - Load at bottom of screen.
* Frontend - Load train services to screen.
* Frontend - Decide what to do with Bus Services.
* Frontend - Decide what to do with Bus Services.
* Frontend - Implement error pages - will need to look at including these on the proxy container too?
- https://expressjs.com/en/guide/error-handling.html

View File

@ -22,7 +22,9 @@
</div>
<div id="nrcc_notices" class="hidden-while-loading">
<p id="notices"></p>
<p>
Services may be subject to alterations due to heavy rain flooding the railway between Bristol Parkway and Swindon.
</p>
</div>
<div id="loading">

View File

@ -90,10 +90,10 @@ async function buildPage(data){
async function displayNotices(notices){
// Input: data.GetStationBoardResult.nrccMessages.messages
// Processing: For each message, add a text scroll to the top of the page.
// Processing: For each message, create a <p> inside #notices.
// If there is more than one notice, scroll between them.
// Output: Only to DOM.
document.getElementById("notices").innerHTML = notices; // This is a mess if more than one notice is present.
document.getElementById("nrcc_notices").style = "display: block;";
//document.getElementById("notices").innerHTML = notices;
}
// Log Helper

View File

@ -97,7 +97,13 @@
display: none;
}
/* Injected Data */
/* NRCC Notices */
#nrcc_notices {
margin-top: 60px;
height: 65px;
font-size: 14px;
}
#nrcc_notices p {
width: 95%;
margin: auto;
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -23,7 +23,14 @@
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'urwgothic';
src: url('/styles/fonts/urwgothic/urwgothicDemi.woff2') format('woff2'),
url('/styles/fonts/urwgothic/urwgothicDemi.woff') format('woff'),
url('/styles/fonts/urwgothic/urwgothicDemi.ttf') format('truetype');
font-weight: 900;
font-style: normal;
}
/* COLOR VARS */
:root {
--main-bg-color: #404c55;