Reviewed-on: #42
This commit is contained in:
Fred Boniface 2022-11-23 22:12:50 +00:00
commit b4f979e596
28 changed files with 725 additions and 137 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 302 B

BIN
assets/nre/nre-powered.xcf Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

13
basic-test.php Normal file
View File

@ -0,0 +1,13 @@
<html>
<head>
<title>TEST_ONLY</title>
</head>
<body>
<?php
require './php/submitIssue.php';
echo cleanInput($_SERVER['QUERY_STRING']);
?>
</body>
</html>

View File

@ -1,19 +1,11 @@
/* When the user clicks on the button, function sidebarOpen() {
toggle between hiding and showing the dropdown content */ document.getElementById("sidebar").style.width = "50%";
function myFunction() { document.getElementById("sidebar_open_short").style.display = "none";
document.getElementById("myDropdown").classList.toggle("show"); document.getElementById("sidebar_close_short").style.display = "block";
} }
// Close the dropdown menu if the user clicks outside of it function sidebarClose() {
window.onclick = function(event) { document.getElementById("sidebar").style.width = "0%"
if (!event.target.matches('.dropbtn')) { document.getElementById("sidebar_open_short").style.display = "block";
var dropdowns = document.getElementsByClassName("dropdown-content"); document.getElementById("sidebar_close_short").style.display = "none";
var i; }
for (i = 0; i < dropdowns.length; i++) {
var openDropdown = dropdowns[i];
if (openDropdown.classList.contains('show')) {
openDropdown.classList.remove('show');
}
}
}
}

View File

@ -1,10 +1,9 @@
<?php <div id="menubar_hamburger" class="hide_micro">
<button class="sidebar_control" id="sidebar_open_short" onclick="sidebarOpen()">&#9776;</button>
echo '<div class="dropdown">'; <button class="sidebar_control" id="sidebar_close_short" onclick="sidebarClose()">&times;</button>
echo ' <button onclick="myFunction()" class="dropbtn">Menu</button>'; </div>
echo ' <div id="myDropdown" class="dropdown-content">'; <div id="sidebar">
echo ' <a class="dropdown-first" href="/">Home</a>'; <a href="/">Home</a>
echo ' <a href="/issue.php">Report Issue</a>'; <a href="/help.php">Help</a>
echo ' <a href="/help.php">Help</a>'; <a href="/issue.php">Report Issue</a>
echo ' </div>'; </div>
echo '</div>';

View File

@ -1,10 +1,9 @@
<?php <picture>
echo '<picture>'; <source media="(max-width:1000px)" srcset="/assets/title/title_355.jxl" type="image/jxl">
echo '<source media="(max-width:1000px)" srcset="/assets/title/title_355.jxl" type="image/jxl">'; <source media="(max-width:1000px)" srcset="/assets/title/title_355.webp" type="image/webp">
echo '<source media="(max-width:1000px)" srcset="/assets/title/title_355.webp" type="image/webp">'; <source media="(max-width:1000px)" srcset="/assets/title/title_355.png" type="image/png">
echo '<source media="(max-width:1000px)" srcset="/assets/title/title_355.png" type="image/png">'; <source srcset="/assets/title/title_600.jxl" type="image/jxl">
echo '<source srcset="/assets/title/title_600.jxl" type="image/jxl">'; <source srcset="/assets/title/title_600.webp" type="image/webp">
echo '<source srcset="/assets/title/title_600.webp" type="image/webp">'; <source srcset="/assets/title/title_600.png" type="image/png">
echo '<source srcset="/assets/title/title_600.png" type="image/png">'; <img class="titleimg" src="/assets/title/title_600.png" alt="Athena Owl Logo">
echo '<img class="titleimg" src="/assets/title/title_600.png" alt="Athena Owl Logo">'; </picture>
echo '</picture>';

View File

@ -1,7 +1,8 @@
<?php <?php
require("./php/openLDBSVWS.php"); require './php/openLDBSVWS.php';
require '/srv/php-keys/athena/gitea.php';
date_default_timezone_set("Europe/London"); date_default_timezone_set("Europe/London");
$OpenLDBSVWS = new OpenLDBSVWS("ACCESS TOKEN"); $OpenLDBSVWS = new OpenLDBSVWS($ldbKey);
$response = $OpenLDBSVWS->GetDepartureBoardByCRS(10,"BRI",date("H:i:s",time()),120,"","","","","True"); $response = $OpenLDBSVWS->GetDepartureBoardByCRS(10,"BRI",date("H:i:s",time()),120,"","","","","True");
header("Content-Type: text/plain"); header("Content-Type: text/plain");
print_r($response); print_r($response);

View File

@ -0,0 +1,56 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>TESTING</title>
</head>
<body>
<?php
require("OpenLDBWS.php");
$OpenLDBWS = new OpenLDBWS("YOUR_ACCESS_TOKEN");
$response = $OpenLDBWS->GetDepartureBoard(10,"GTW");
$template["header"] = "
<table>
<thead>
<tr>
<th>Time</th>
<th>Destination</th>
<th>Platform</th>
<th>Expected</th>
</tr>
</thead>
<tbody>
";
$template["row"] = "
<tr>
<td>{std}</td>
<td>{destination}</td>
<td>{platform}</td>
<td>{etd}</td>
</tr>
";
$template["footer"] = "
</tbody>
</table>
";
if (isset($response->GetStationBoardResult->trainServices->service))
{
print $template["header"];
foreach($response->GetStationBoardResult->trainServices->service as $service)
{
$row = $template["row"];
$destinations = array();
foreach($service->destination->location as $location)
{
$destinations[] = $location->locationName;
}
$row = str_replace("{std}",$service->std,$row);
$row = str_replace("{destination}",implode(" and ",$destinations),$row);
$row = str_replace("{platform}",(isset($service->platform)?$service->platform:"&nbsp;"),$row);
$row = str_replace("{etd}",$service->etd,$row);
print $row;
}
print $template["footer"];
}
?>
</body>
</html>

View File

@ -0,0 +1,65 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>TESTING</title>
</head>
<body>
<?php
require './php/openLDBSVWS.php';
require './php/submitIssue.php';
require '/srv/php-keys/athena/gitea.php';
echo cleanInput($_SERVER['QUERY_STRING']);
date_default_timezone_set("Europe/London");
$OpenLDBSVWS = new OpenLDBSVWS($ldbKey);
$response = $OpenLDBSVWS->GetDepartureBoardByCRS(10,"BRI",date("H:i:s",time()),120,"","","","","True");
$template["header"] = "
<table>
<thead>
<tr>
<th>ID</th>
<th>Org.</th>
<th>Dest.</th>
<th>Plat.</th>
<th>Sch</th>
<th>Exp</th>
</tr>
</thead>
<tbody>
";
$template["row"] = "
<tr>
<td>{id}</td>
<td>{org}</td>
<td>{dest}</td>
<td>{plat}</td>
<td>{sch}</td>
<td>{act}</td>
</tr>
";
$template["footer"] = "
</tbody>
</table>
";
if (isset($response->GetBoardResult->trainServices->service))
{
print $template["header"];
foreach($response->GetBoardResult->trainServices->service as $service)
{
$row = $template["row"];
$destinations = array();
$row = str_replace("{id}",$service->trainid,$row);
$row = str_replace("{org}",$service->origin->location->tiploc,$row);
$row = str_replace("{dest}",$service->destination->location->tiploc,$row);
$row = str_replace("{plat}",$service->platform,$row);
$row = str_replace("{sch}",$servoce->std,$row);
$row = str_replace("{act}",$service->etd,$row);
print $row;
}
print $template["footer"];
}
?>
</body>
</html>

View File

@ -0,0 +1,500 @@
stdClass Object
(
[GetBoardResult] => stdClass Object
(
[generatedAt] => 2022-11-05T21:47:01.9993579+00:00
[locationName] => London Paddington
[crs] => PAD
[stationManager] => Network Rail
[stationManagerCode] => RT
[isTruncated] => 1
[trainServices] => stdClass Object
(
[service] => Array
(
[0] => stdClass Object
(
[rid] => 202211057051479
[uid] => F51479
[trainid] => 9U02
[rsid] => XR134200
[sdd] => 2022-11-05
[operator] => Elizabeth Line
[operatorCode] => XR
[std] => 2022-11-05T21:48:00
[etd] => 2022-11-05T21:48:00
[departureType] => Forecast
[departureSource] => Darwin
[platform] => A
[origin] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => London Paddington
[crs] => PAD
[tiploc] => PADTLL
)
)
)
[destination] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => Abbey Wood
[crs] => ABW
[tiploc] => ABWDXR
)
)
)
[category] => OO
[activities] => TB
)
[1] => stdClass Object
(
[rid] => 202211057919346
[uid] => O19346
[trainid] => 1T91
[sdd] => 2022-11-05
[operator] => Great Western Railway
[operatorCode] => GW
[std] => 2022-11-05T21:55:00
[etd] => 2022-11-05T21:55:00
[departureType] => Forecast
[departureSource] => TD
[platform] => 7
[origin] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => London Paddington
[crs] => PAD
[tiploc] => PADTON
)
)
)
[destination] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => Heathrow Airport T5
[crs] => HWV
[tiploc] => HTRWTM5
)
)
)
[category] => OO
[activities] => TB
)
[2] => stdClass Object
(
[rid] => 202211057051484
[uid] => F51484
[trainid] => 9U04
[rsid] => XR134700
[sdd] => 2022-11-05
[operator] => Elizabeth Line
[operatorCode] => XR
[std] => 2022-11-05T21:58:00
[etd] => 2022-11-05T21:58:00
[departureType] => Forecast
[departureSource] => Darwin
[platform] => A
[origin] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => London Paddington
[crs] => PAD
[tiploc] => PADTLL
)
)
)
[destination] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => Abbey Wood
[crs] => ABW
[tiploc] => ABWDXR
)
)
)
[category] => OO
[activities] => TB
)
[3] => stdClass Object
(
[rid] => 202211057051488
[uid] => F51488
[trainid] => 9U06
[rsid] => XR135100
[sdd] => 2022-11-05
[operator] => Elizabeth Line
[operatorCode] => XR
[std] => 2022-11-05T22:08:00
[etd] => 2022-11-05T22:08:00
[departureType] => Forecast
[departureSource] => Darwin
[platform] => A
[origin] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => London Paddington
[crs] => PAD
[tiploc] => PADTLL
)
)
)
[destination] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => Abbey Wood
[crs] => ABW
[tiploc] => ABWDXR
)
)
)
[category] => OO
[activities] => TB
)
[4] => stdClass Object
(
[rid] => 202211057919347
[uid] => O19347
[trainid] => 1T92
[sdd] => 2022-11-05
[operator] => Great Western Railway
[operatorCode] => GW
[std] => 2022-11-05T22:10:00
[etd] => 2022-11-05T22:10:00
[departureType] => Forecast
[departureSource] => TD
[platform] => 6
[platformIsHidden] => 1
[origin] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => London Paddington
[crs] => PAD
[tiploc] => PADTON
)
)
)
[destination] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => Heathrow Airport T5
[crs] => HWV
[tiploc] => HTRWTM5
)
)
)
[category] => OO
[activities] => TB
)
[5] => stdClass Object
(
[rid] => 202211057051492
[uid] => F51492
[trainid] => 9U08
[rsid] => XR135500
[sdd] => 2022-11-05
[operator] => Elizabeth Line
[operatorCode] => XR
[std] => 2022-11-05T22:18:00
[etd] => 2022-11-05T22:18:00
[departureType] => Forecast
[departureSource] => Darwin
[platform] => A
[origin] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => London Paddington
[crs] => PAD
[tiploc] => PADTLL
)
)
)
[destination] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => Abbey Wood
[crs] => ABW
[tiploc] => ABWDXR
)
)
)
[category] => OO
[activities] => TB
)
[6] => stdClass Object
(
[rid] => 202211057919350
[uid] => O19350
[trainid] => 1T93
[sdd] => 2022-11-05
[operator] => Great Western Railway
[operatorCode] => GW
[std] => 2022-11-05T22:25:00
[etd] => 2022-11-05T22:25:00
[departureType] => Forecast
[departureSource] => Darwin
[platform] => 7
[platformIsHidden] => 1
[origin] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => London Paddington
[crs] => PAD
[tiploc] => PADTON
)
)
)
[destination] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => Heathrow Airport T5
[crs] => HWV
[tiploc] => HTRWTM5
)
)
)
[category] => OO
[activities] => TB
)
[7] => stdClass Object
(
[rid] => 202211057051497
[uid] => F51497
[trainid] => 9U10
[rsid] => XR136000
[sdd] => 2022-11-05
[operator] => Elizabeth Line
[operatorCode] => XR
[std] => 2022-11-05T22:28:00
[etd] => 2022-11-05T22:28:00
[departureType] => Forecast
[departureSource] => Darwin
[platform] => A
[origin] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => London Paddington
[crs] => PAD
[tiploc] => PADTLL
)
)
)
[destination] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => Abbey Wood
[crs] => ABW
[tiploc] => ABWDXR
)
)
)
[category] => OO
[activities] => TB
)
[8] => stdClass Object
(
[rid] => 202211057051502
[uid] => F51502
[trainid] => 9U12
[rsid] => XR136500
[sdd] => 2022-11-05
[operator] => Elizabeth Line
[operatorCode] => XR
[std] => 2022-11-05T22:38:00
[etd] => 2022-11-05T22:38:00
[departureType] => Forecast
[departureSource] => Darwin
[platform] => A
[origin] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => London Paddington
[crs] => PAD
[tiploc] => PADTLL
)
)
)
[destination] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => Abbey Wood
[crs] => ABW
[tiploc] => ABWDXR
)
)
)
[category] => OO
[activities] => TB
)
[9] => stdClass Object
(
[rid] => 202211057919351
[uid] => O19351
[trainid] => 1T94
[sdd] => 2022-11-05
[operator] => Great Western Railway
[operatorCode] => GW
[std] => 2022-11-05T22:40:00
[etd] => 2022-11-05T22:40:00
[departureType] => Forecast
[departureSource] => Darwin
[platform] => 6
[platformIsHidden] => 1
[origin] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => London Paddington
[crs] => PAD
[tiploc] => PADTON
)
)
)
[destination] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => Heathrow Airport T5
[crs] => HWV
[tiploc] => HTRWTM5
)
)
)
[category] => OO
[activities] => TB
)
)
)
)
)

View File

@ -1,2 +1,2 @@
<?php <?php
$athenaVersion = '0.4.3-alpha'; $athenaVersion = '0.4.4-alpha';

View File

@ -1,11 +1,19 @@
/* COLOR VARS */
:root {
--main-bg-color: #aac4ee;
--accent-color: #7fa7e6;
--overlay-color: #7fa6e6de;
--main-text-color: #016ec7;
--link-color: azure;
--link-visited-color: azure;
}
body { body {
background-color: #aac4ee; background-color: var(--main-bg-color);
color: #0280e5; color: var(--main-text-color);
font-family: sans-serif; font-family: sans-serif;
text-align: center; text-align: center;
padding-bottom: 60px; /*Footer height*/ padding-bottom: 60px; /*Footer height*/
} }
.titleimg { .titleimg {
width: 80%; width: 80%;
padding-top: 50px; padding-top: 50px;
@ -13,7 +21,6 @@ body {
max-width: 500px; max-width: 500px;
transition: 0.2s; transition: 0.2s;
} }
.lookup-box { .lookup-box {
text-align: center; text-align: center;
border: black; border: black;
@ -25,7 +32,6 @@ body {
text-transform: uppercase; text-transform: uppercase;
transition: 0.2s; transition: 0.2s;
} }
.form-text-small { .form-text-small {
text-align: center; text-align: center;
border: black; border: black;
@ -35,13 +41,7 @@ body {
font-size: 18px; font-size: 18px;
transition: 0.2s; transition: 0.2s;
} }
@media only screen and (min-width: 600px) {.form-text-small{width: 50%}}
@media only screen and (min-width: 600px) {
.form-text-small {
width: 50%;
}
}
.form-text-large { .form-text-large {
text-align: left; text-align: left;
border: black; border: black;
@ -52,40 +52,27 @@ body {
font-size: 16px; font-size: 16px;
transition: 0.2s; transition: 0.2s;
} }
@media only screen and (min-width: 600px) {.form-text-large{width: 50%}}
@media only screen and (min-width: 600px) {
.form-text-large {
width: 50%;
}
}
.form-info { .form-info {
color: #0280e5; color: var(--main-text-color);
font-size: 17px; font-size: 17px;
font-weight: bolder; font-weight: bolder;
margin-bottom: 4px; margin-bottom: 4px;
} }
.text-description { .text-description {
display: inline-block; display: inline-block;
width: 80%; width: 80%;
color: #0280e5; color: var(--main-text-color);
padding-top: 5px; padding-top: 5px;
padding-bottom: 5px; padding-bottom: 5px;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
transition: 0.2s; transition: 0.2s;
} }
@media only screen and (min-width: 600px) {.text-description{width: 50%}}
@media only screen and (min-width: 600px) {
.text-description{
width: 50%;
}
}
.lookup-button { .lookup-button {
background-color: #3c78d8; background-color: #3c78d8;
color: #f6f5f4; color: var(--link-color);
border: none; border: none;
border-radius: 18px; border-radius: 18px;
font-size: 16px; font-size: 16px;
@ -96,7 +83,6 @@ body {
margin-bottom: 10px; margin-bottom: 10px;
cursor: pointer; cursor: pointer;
} }
.actionbutton { .actionbutton {
display: inline-block; display: inline-block;
text-decoration: none; text-decoration: none;
@ -104,101 +90,78 @@ body {
background-color: #3c78d8; background-color: #3c78d8;
border: none; border: none;
border-radius: 10px; border-radius: 10px;
color: #f6f5f4; color: var(--link-color);
padding: 7px; padding: 7px;
margin-bottom: 10px; margin-bottom: 10px;
font-size: 16px; font-size: 16px;
} }
.inlinelink { .inlinelink {
text-decoration: underline; text-decoration: underline;
color: #3c78d8; color: var(--link-color);
cursor: pointer; cursor: pointer;
} }
/* START MENU STYLE */ /* START MENU STYLE */
#menubar_hamburger {
/* Menu Button */
.dropbtn {
position: fixed;
top: 0;
right: 0;
background-color: #7fa7e6;
color: white;
padding: 12px;
font-size: 12px;
box-shadow: 0px 4px 4px 0px rgba(0,0,0,0.2);
border: none;
border-bottom-left-radius: 10px;
cursor: pointer;
}
.dropbtn:hover, .dropbtn:focus {
background-color: #0280e5;
}
/* The container <div> - needed to position the dropdown content */
.dropdown {
position: relative;
display: inline-block;
}
/* Dropdown Content (Hidden by Default) */
.dropdown-content {
display: none;
position: absolute; position: absolute;
top: -80px; top: 2px;
/*right: -190px;*/ right: 0;
left: 150px; padding: 5px;
background-color: #7fa7e6;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
} }
.sidebar_control {
/* Links inside the dropdown */ background-color: transparent;
.dropdown-content a { color: var(--link-color);
color: white; border: none;
padding: 12px 16px; font-family: sans-serif;
text-decoration: none; font-size: larger;
}
#sidebar_open_short {display: block;}
#sidebar_close_short {
display: none;
font-size: x-large;
}
#sidebar {
position: fixed;
top: 40px;
right: 0;
margin: auto;
display: block; display: block;
border-bottom: 1px solid black; max-width: 250px;
width: 0;
border-top-left-radius: 45px;
border-bottom-left-radius: 45px;
background-color: var(--overlay-color);
transition: 0.4s;
} }
#sidebar a {
/*Final item of the dropdown has bottom border*/ padding: 8px 8px 8px 8px;
.dropdown-first { margin-top: 10px;
border-top: 1px solid black; margin-bottom: 10px;
font-family: indie-flower, sans-serif;
font-weight: 300;
text-decoration: none;
text-align: center;
font-size: 25px;
color: var(--link-color);
display: block;
white-space: nowrap;
transition: 0.5s;
} }
/* Change color of dropdown links on hover */
.dropdown-content a:hover {background-color: #ddd;}
/* Show the dropdown menu (use JS to add this class to the .dropdown-content container when the user clicks on the dropdown button) */
.show {display:block;}
/* END MENU STYLE */
/* Footer Styles */
/* Footer Styles */ /* Footer Styles */
footer { footer {
background-color: #7fa7e6; background-color: var(--accent-color);
color: white; color: white;
width: 100%; width: 100%;
position: fixed; position: fixed;
bottom: 0; bottom: 0;
left: 0; left: 0;
} }
footer a { footer a {
text-decoration: underline; text-decoration: underline;
color: white; color: white;
} }
footer a:visited { footer a:visited {
color: white; color: white;
} }
footer a:hover { footer a:hover {
color: beige; color: beige;
} }