Compare commits

..

No commits in common. "master" and "v0.4.1-alpha" have entirely different histories.

40 changed files with 178 additions and 897 deletions

View File

@ -1,5 +0,0 @@
nginx.Dockerfile
php.Dockerfile
.dockerignore
.gitignore
LICENSE

View File

@ -1,5 +1,3 @@
# athena.fb-infra.uk # athena.fb-infra.uk
**Athena has been superceded by OwlBoard - [git](https://git.fjla.uk/OwlBoard) - [web](https://owlboard.info)** The web-app at athena.fb-infra.uk
**This repository is archived**

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

BIN
assets/icons/menu.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 B

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

View File

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

View File

@ -1,40 +0,0 @@
#!/bin/bash
ROOTIN="/data/in"
ROOTOUT="/data/out"
echo "Running UglifyJS on /data/in folder"
uglifyjs-folder "$ROOTIN" -x ".js" -eo "$ROOTOUT"
echo "Running UglifyCSS"
CSSIN="/data/in/styles/"
CSSOUT="/data/out/styles"
cd $CSSIN
echo "Changed directory"
for f in *
do
if [ -f "$f" ]; then
uglifycss "$f" --output "$f";
fi
done
echo "Moving 'styles' to 'out'"
cp -r $CSSIN $CSSOUT
echo "Running html-minifier-terser on /folder"
HTMLIN="/data/in/"
HTMLOUT="/data/out"
html-minifier-terser --collapse-whitespace --remove-comments --file-ext html --input-dir /data/in/ --output-dir /data/out/
echo "Moving JSON Manifest file from root to output"
cat /data/in/manifest.json | jq -c > /data/out/manifest.json
echo "Moving other files folder from in/ to out/"
cp -r /data/in/assets /data/out/assets
cp -r /data/in/error-pages /data/out/error-pages
cp -r /data/in/page-blocks /data/out/page-blocks
cp -r /data/in/*.php /data/out
echo "Running GZIP & Brotli on all HTML, JS, CSS, JSON, SVG, TTF, VCF, PUB files"
find /data/out -type f -name \*.html -or -name \*.vcf -or -name \*.pub -or -name \*.js -or -name \*.css -or -name \*.json -or -name \*.svg -or -name \*.ttf | while read file; do gzip -k -9 $file; brotli -k -q 11 $file; done

View File

@ -1,57 +0,0 @@
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log notice;
pid /var/run/nginx.pid;
events {
worker_connections 128;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
keepalive_timeout 65;
gzip_static on;
brotli_static on;
server {
listen 80;
server_name localhost;
access_log /var/log/nginx/access.log;
root /site;
location ~ /(.git|php|page-blocks) {
deny all;
}
location / {
index index.php;
try_files $uri $uri/ $uri/index.php &uri/index.html =404;
break;
expires 7d;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass localhost:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
error_page 403 /error-pages/403.php;
error_page 404 /error-pages/404.php;
error_page 500 501 502 503 504 /error-pages/50x.php;
}
}

View File

@ -11,25 +11,19 @@
<body> <body>
<!-- Popup Menu --> <!-- Popup Menu -->
<?php include "./page-blocks/nav-menu.php";?> <?php require "./page-blocks/nav-menu.php";?>
<!-- Main Content Begins --> <!-- Main Content Begins -->
<?php include "./page-blocks/title-image.php";?> <?php require "./page-blocks/title-image.php";?>
<br> <br>
<br>
<br> <input class="lookup-box" type="text" id="crs-lookup" name="crs-lookup" placeholder="Enter CRS/TIPLOC"/>
<br> <br>
<input class="lookup-box" type="text" id="crs-lookup" name="crs-lookup" placeholder="Enter CRS/TIPLOC"/> <button class="lookup-button" onclick="getTextEntry()">Lookup Departure Board</button>
<br>
<button class="lookup-button" onclick="getTextEntry()">Lookup Departure Board</button> <br>
<br> <br>
<br>
<h2 hidden>Server Maintenance</h2>
<p hidden>Athena may become unavailable for several hours on 07/03/2023
during a server migration. Every effort will be made to prevend downtime.
</p>
<h2>Quick Links</h2> <h2>Quick Links</h2>
<button class="actionbutton" onclick="gotoInfoBoard('bathspa')">BTH</button> <button class="actionbutton" onclick="gotoInfoBoard('bathspa')">BTH</button>
@ -45,12 +39,12 @@
<br> <br>
<br> <br>
<div class="text-description"> <div class="text-description">
<p>Athena has been replaced with <a href="https://owlboard.info">OwlBoard</a>.</p> <p>This is an Alpha release and is under testing.</p>
<p>Athena will remain available for use as OwlBoard does not yet offer staff versions of boards.</p> <p>Some features may not work and some stations may not be available.</p>
</div> </div>
<!-- Footer --> <!-- Footer -->
<?php include "./page-blocks/footer.php";?> <?php include "./page-blocks/footer.php" ?>
</body> </body>

View File

@ -31,7 +31,7 @@
sendInput($title,$body); sendInput($title,$body);
// Redirect to submit-done.php // Redirect to submit-done.php
echo "<script>setTimeout(function(){window.location.href = '/submit-done.php';}, 10);</script>"; echo "<script>setTimeout(function(){window.location.href = '/submit-done.php';}, 100);</script>";
}; };
?> ?>
@ -41,13 +41,28 @@
<!-- Main Content Begins --> <!-- Main Content Begins -->
<?php require "./page-blocks/title-image.php";?> <?php require "./page-blocks/title-image.php";?>
<h1>Athena is retiring</h1> <h1>Please help us fix your issue</h1>
<p>It has been replaced with <a href="https://owlboard.info">OwlBoard</a>.</p> <p>Give as much detail as possible so we can try to fix the problem.</p>
<form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>" method="post">
<span class="form-info">Subject:</span>
<br>
<input class="form-text-small" type="text" name="subject" placeholder="Subject" value="<?php echo $title;?>">
<br>
<br>
<span class="form-info">Details:</span>
<br>
<textarea class="form-text-large" placeholder="Please give as much detail here as possible" name="detail"><?php echo $detail;?></textarea>
<br>
<br>
<br>
<div class="text-description">
<p> <p>
Currently, OwlBoard does not offer staff versions of departure boards. On submission of this form, your browsers User Agent string will be
Because of this, Athena will not have any further issues fixed but will remain collected alongside the information you provide above and will be
available until OwlBoard offers this feature. posted to the <a class="inlinelink" href="https://git.fjla.uk/fred.boniface/athena.fb-infra.uk/issues?q=&state=open">
issue tracker</a>.
</p> </p>
<br> <br>
<br> <br>
@ -57,6 +72,9 @@
<br> <br>
<?php echo $ua_str; ?> <?php echo $ua_str; ?>
</div> </div>
<br>
<br>
<input class="actionbutton" type="submit">
</form> </form>

View File

@ -1,11 +1,19 @@
function sidebarOpen() { /* When the user clicks on the button,
document.getElementById("sidebar").style.width = "50%"; toggle between hiding and showing the dropdown content */
document.getElementById("sidebar_open_short").style.display = "none"; function myFunction() {
document.getElementById("sidebar_close_short").style.display = "block"; document.getElementById("myDropdown").classList.toggle("show");
} }
function sidebarClose() { // Close the dropdown menu if the user clicks outside of it
document.getElementById("sidebar").style.width = "0%" window.onclick = function(event) {
document.getElementById("sidebar_open_short").style.display = "block"; if (!event.target.matches('.dropbtn')) {
document.getElementById("sidebar_close_short").style.display = "none"; var dropdowns = document.getElementsByClassName("dropdown-content");
} 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,12 +0,0 @@
FROM fedora:latest as compressor
RUN dnf install brotli nodejs npm jq -y
RUN npm i uglifyjs-folder uglifycss html-minifier-terser -g
COPY . /data/in
RUN bash /data/in/conf/deploy.sh
FROM fholzer/nginx-brotli:latest
RUN rm /etc/nginx/nginx.conf
RUN apk update
RUN apk add --upgrade libxml2 libxslt
COPY ./conf/nginx.conf /etc/nginx/nginx.conf
COPY --from=compressor /data/out/ /site/

View File

@ -1,6 +1,5 @@
<?php <?php
include "./php/version.php"; include "./php/version.php";
?> echo "<footer>";
<footer> echo "<p>Created by Fred Boniface - v$athenaVersion</p>";
<p>Created by <a href="https://fredboniface.co.uk" target="_blank" rel="noreferrer noopener">Fred Boniface</a> - v<?php echo $athenaVersion ?></p> echo "</footer>";
</footer>

View File

@ -1,10 +1,12 @@
<meta charset="UTF-8"/> <?php
<meta name="description" content="Athena - Live train departures for traincrew."/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="application-name" content="Athena">
<meta name="author" content="Frederick Boniface">
<link rel="stylesheet" type="text/css" href="/styles/style.css"/>
<link rel="icon" type="image/png" href="/assets/icons/favicon.ico"/>
<link rel="manifest" type="application/json" href="/manifest.json"/>
<script src="/js/nav.js"></script> echo '<meta charset="UTF-8"/>';
echo '<meta name="description" content="Athena - Live train departures for traincrew."/>';
echo '<meta name="viewport" content="width=device-width, initial-scale=1.0">';
echo '<meta name="application-name" content="Athena">';
echo '<meta name="author" content="Frederick Boniface">';
echo '<link rel="stylesheet" type="text/css" href="/styles/style.css"/>';
echo '<link rel="icon" type="image/png" href="/assets/icons/favicon.ico"/>';
echo '<link rel="manifest" type="application/json" href="/manifest.json"/>';
echo '<script src="/js/nav.js"></script>';

View File

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

View File

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

View File

@ -1,3 +0,0 @@
FROM php:8.2.1-fpm-alpine
COPY . /site

View File

@ -1,8 +1,7 @@
<?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($ldbKey); $OpenLDBSVWS = new OpenLDBSVWS("ACCESS TOKEN");
$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

@ -1,56 +0,0 @@
<!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

@ -1,65 +0,0 @@
<!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

@ -1,500 +0,0 @@
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

@ -3,7 +3,7 @@
function sendInput($title,$body) { function sendInput($title,$body) {
// Get API Key for git.fjla.uk // Get API Key for git.fjla.uk
require '/srv/keys/athena/apiKeys.php'; require '/srv/php-keys/athena/gitea.php';
// Set httpHeaders // Set httpHeaders
$httpHeaders = array( $httpHeaders = array(

View File

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

View File

@ -1,30 +1,22 @@
/* 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: var(--main-bg-color); background-color: #aac4ee;
color: var(--main-text-color); color: #0280e5;
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;
padding-bottom: 10px; padding-bottom: 50px;
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;
padding-top: 40px;
border-radius: 40px; border-radius: 40px;
padding: 10px; padding: 10px;
margin-bottom: 5px; margin-bottom: 5px;
@ -32,6 +24,7 @@ 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;
@ -41,7 +34,13 @@ 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,27 +51,40 @@ 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: var(--main-text-color); color: #0280e5;
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: var(--main-text-color); color: #0280e5;
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: var(--link-color); color: #f6f5f4;
border: none; border: none;
border-radius: 18px; border-radius: 18px;
font-size: 16px; font-size: 16px;
@ -83,6 +95,7 @@ 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;
@ -90,78 +103,84 @@ body {
background-color: #3c78d8; background-color: #3c78d8;
border: none; border: none;
border-radius: 10px; border-radius: 10px;
color: var(--link-color); color: #f6f5f4;
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: var(--link-color); color: #3c78d8;
cursor: pointer; cursor: pointer;
} }
/* START MENU STYLE */ /* START MENU STYLE */
#menubar_hamburger {
position: absolute; /* Dropdown Button */
top: 2px; .dropbtn {
right: 0;
padding: 5px;
}
.sidebar_control {
background-color: transparent;
color: var(--link-color);
border: none;
font-family: sans-serif;
font-size: larger;
}
#sidebar_open_short {display: block;}
#sidebar_close_short {
display: none;
font-size: x-large;
}
#sidebar {
position: fixed; position: fixed;
top: 40px; top: 0;
right: 0; right: 0;
margin: auto; background-color: #7fa7e6;
display: block; color: white;
max-width: 250px; padding: 12px;
width: 0; font-size: 12px;
border-top-left-radius: 45px; border: none;
border-bottom-left-radius: 45px; border-bottom-left-radius: 10px;
background-color: var(--overlay-color); cursor: pointer;
transition: 0.4s;
} }
#sidebar a {
padding: 8px 8px 8px 8px; /* Dropdown button on hover & focus */
margin-top: 10px; .dropbtn:hover, .dropbtn:focus {
margin-bottom: 10px; background-color: #0280e5;
font-family: indie-flower, sans-serif; }
font-weight: 300;
/* 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;
background-color: #7fa7e6;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
}
/* Links inside the dropdown */
.dropdown-content a {
color: white;
padding: 12px 16px;
text-decoration: none; text-decoration: none;
text-align: center;
font-size: 25px;
color: var(--link-color);
display: block; display: block;
white-space: nowrap; border-top: 1px solid black;
transition: 0.5s;
} }
/*Final item of the dropdown has bottom border*/
.dropdown-last {
border-bottom: 1px solid black;
}
/* 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 { footer {
background-color: var(--accent-color); background-color: #7fa7e6;
color: white; color: white;
width: 100%; width: 100%;
position: fixed; position: fixed;
bottom: 0; bottom: 0;
left: 0; left: 0;
} }
footer a {
text-decoration: underline;
color: white;
}
footer a:visited {
color: white;
}
footer a:hover {
color: beige;
}

View File

@ -23,13 +23,13 @@
<p>You're helping to make Athena better for everyone.</p> <p>You're helping to make Athena better for everyone.</p>
<br> <br>
<br> <br>
<p>You will be redirected to the homepage in three seconds.</p> <p>You will be redirected to the homepage in five seconds.</p>
</div> </div>
<script> <script>
setTimeout(function(){ setTimeout(function(){
window.location.href = '/'; window.location.href = '/';
}, 3000); }, 5000);
</script> </script>
<!-- Footer --> <!-- Footer -->