From 7debbe48605079594315a7d0b5be673b27b1015e Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Sun, 22 Jan 2023 13:49:38 +0000 Subject: [PATCH] Frontend: - PNG Fallback option for alert icon. - Styling of calling boxes. - Styling of departure board headers. Signed-off-by: Fred Boniface --- UpNext.md | 8 ++-- static/board.html | 7 +++- static/images/nav/alert_icon-50.png | Bin 0 -> 2139 bytes static/js/boards.js | 58 +++++++++++++++++++--------- static/js/public-board.js | 10 +++-- static/styles/boards.css | 13 ++++++- 6 files changed, 67 insertions(+), 29 deletions(-) create mode 100644 static/images/nav/alert_icon-50.png diff --git a/UpNext.md b/UpNext.md index 0c0c9ba..d9db93c 100644 --- a/UpNext.md +++ b/UpNext.md @@ -3,13 +3,15 @@ ## Frontend: * Implement error pages. -* Still need SVG Fallback option for alert icon on board.html * Alerts box should not be clickable, bar should be. * Issue page: Submit using API. -* UNDER TEST:: Support multiple service origins/destinations: - - Where there are multiples an array is returned for trainServices.service * Enable text search for `locationName` on find-code page. + +### Completed - Testing: + * Implement calling list. +* Still need SVG Fallback for alert icon. +* Support multiple origins/destinations: NOT INCLUDING ON CALLING LIST ## Backend: diff --git a/static/board.html b/static/board.html index ebbe8b9..f7ed4d6 100644 --- a/static/board.html +++ b/static/board.html @@ -36,7 +36,10 @@
- + + + +

@@ -113,7 +116,7 @@ - Home + Home
diff --git a/static/images/nav/alert_icon-50.png b/static/images/nav/alert_icon-50.png new file mode 100644 index 0000000000000000000000000000000000000000..fac429ee9e7a19f598c70c811367fbcd5a0d0373 GIT binary patch literal 2139 zcmV-h2&DIkP)EX>4Tx04R}tkv&MmP!xqvQ%j|^I9No)AwzYti;6hbDionYs1;guFnQ@8G-*jv zTpR`0f`dPcRRYVq9qpU2e#OK5l23?T&k?V@fZ=6dG3p_JwWHa-`QDU*w!%7dcvY`=A6US6dr+gvj zvdVdjvsP`e&OP}H!v%e1nd`Jhk-{RDAVGwJ1}dn+LY#J;6cZUbPkQ)A9KS>^giI*aj}HyP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oNB-G3 zc1;Bl;Cwbt5Q;oTbbnO8R< zVzYtf$Jm1ZW8vyA%LNrMd$kN?MbFJ^R)KtL82ltu!zx9+&~YlvvWNi`e(*-EVeJ6H z^f}BiG0

X

@@ -176,8 +189,17 @@ async function deflateAlerts() { async function buildCalls(data) { var timeEt = await parseTime(data.et) return ` - ${data.locationName} - ${data.st} - ${timeEt.data} + ${data.locationName} + ${data.st} + ${timeEt.data} + ` +} + +async function buildPastCalls(data) { + var timeEt = await parseTime(data.at) + return ` + ${data.locationName} + ${data.st} + ${timeEt.data} ` } \ No newline at end of file diff --git a/static/js/public-board.js b/static/js/public-board.js index ae02089..3ea57e5 100644 --- a/static/js/public-board.js +++ b/static/js/public-board.js @@ -99,6 +99,7 @@ async function displayTrains(data) { } clearLoading(); + document.getElementById("output").style = "display:block;"; log(`Insertion complete`) } @@ -113,6 +114,7 @@ async function displayBus(busSvc) { log(JSON.stringify(busSvc)) for(var i = 0; i < busSvc.service.length; i++) { displayBusService(busSvc.service[i]) + buildCallLists(busSvc.service[i]) } } @@ -131,8 +133,8 @@ async function displayService(svc) { var row = ` - - + + @@ -172,8 +174,8 @@ async function displayFerryService(svc) { var row = `
${svc.origin.location.locationName}${svc.destination.location.locationName}${await parseName(svc.origin.location)}${await parseName(svc.destination.location)} ${plt.num} ${sta.data} ${eta.data}
- - + + diff --git a/static/styles/boards.css b/static/styles/boards.css index 6c793e8..039389a 100644 --- a/static/styles/boards.css +++ b/static/styles/boards.css @@ -137,6 +137,7 @@ /* Content */ #output { + display: none; width: 100%; margin-top: 65px; } @@ -173,18 +174,20 @@ caption{ .name-item { color: var(--board-name-color); + font-size: 12px; } .plat{ width: 4%; + font-size: 12px; text-align: center; } .time{ width: 11.5%; + font-size: 12px; text-align: center; } - .msg{ width: 95%; font-size: 10px; @@ -199,7 +202,8 @@ caption{ display: none; border-radius: 20px; width: 93%; - position: absolute; + max-height: 75%; + position: fixed; z-index: 10; top: 50px; left: 0; @@ -210,6 +214,7 @@ caption{ padding-bottom: 10px; margin-bottom: 25px; background-color: var(--overlay-color); + overflow: scroll; } .close-data { @@ -219,6 +224,10 @@ caption{ font-weight: 900; } +.detail-table-content { + font-size: 12px; +} + .changed{ animation: pulse-change 1.5s linear infinite; }
${parseName(svc.origin.location.locationName)}${parseName(svc.destination.location.locationName)}${await parseName(svc.origin.location)}${await parseName(svc.destination.location)} ${plt} ${sta.data} ${eta.data}