Compare commits

...

37 Commits

Author SHA1 Message Date
004d7798e2 Update 'README.md' 2023-08-24 15:11:17 +01:00
3f66b8bf86 Dockerize 2023-03-19 20:22:58 +00:00
59791b49ec Updates 2023-03-19 20:08:58 +00:00
4491d5e0a3 Update owlboard links 2023-03-06 21:16:11 +00:00
364cec91fc Update depreciation notices 2023-03-05 23:43:53 +00:00
96feb27b76 Depreciate
Depreciation message.
2023-01-30 16:19:27 +00:00
e3f74fd45e Change path to server key strings 2022-11-26 15:28:55 +00:00
b4f979e596 testing (#42)
Reviewed-on: #42
2022-11-23 22:12:50 +00:00
39b54af4b5 Update version string ready for merget to master 2022-11-23 22:10:18 +00:00
de940d95fe v0.4.4-devel (#41)
Reviewed-on: #41
2022-11-23 21:55:58 +00:00
268facd3e7 Add testing scripts 2022-11-05 22:16:09 +00:00
fd78ef1284 Prepare testing page 2022-11-05 22:07:12 +00:00
d1b5046a42 Add examples for styling and testing 2022-11-05 21:50:22 +00:00
d99e13849e Add NRE Logos in preparation for LDB API Additions 2022-11-05 21:42:10 +00:00
f2432e310e Closes issue #39 2022-11-05 20:48:13 +00:00
6a64ede3f6 Tidy CSS 2022-10-30 21:21:09 +00:00
b5a652344c Closes issue #40 2022-10-30 21:18:21 +00:00
e409ff190a Update CSS Colors to vars 2022-10-30 20:51:06 +00:00
8225f8eae2 Correct links on borrowed menu 2022-10-30 20:39:08 +00:00
b368e65bd9 Testing new menu 2022-10-30 20:36:17 +00:00
f4dc85e434 Bump version string 2022-10-30 20:13:06 +00:00
62fd32b7c2 Styling Fixes 2022-10-17 15:26:35 +01:00
063f939abe Fix silly error 2022-10-17 15:19:40 +01:00
5862764f58 Fix silly error 2022-10-17 15:17:45 +01:00
78557474cb Cat fixes 2022-10-17 14:39:24 +01:00
6c6a404538 Further cat fixes 2022-10-17 14:36:32 +01:00
5c9c385d86 Cat fixes 2022-10-17 14:32:56 +01:00
5622b99adf Still fixing what the cat did 2022-10-17 14:30:28 +01:00
d1904ba4bc Fixing what the cat did when he was on my keyboard 2022-10-17 14:26:16 +01:00
83e2e06073 Trial Fix 2022-10-17 14:23:36 +01:00
49492a42d0 0.4.3-devel (#36)
Reviewed-on: #36
2022-10-17 13:14:24 +00:00
78c6fa2620 0.4.3-devel (#36)
Reviewed-on: #36
2022-10-17 13:13:16 +00:00
4b1a8315e7 0.4.3-devel (#36)
Reviewed-on: #36
2022-10-17 13:13:15 +00:00
2103a2f651 0.4.3-devel (#36)
Reviewed-on: #36
2022-10-17 13:12:56 +00:00
ce9e30807e 0.4.3-devel (#36)
Reviewed-on: #36
2022-10-17 13:12:55 +00:00
b4df99c961 Remove maintenance notice 2022-10-17 12:21:23 +01:00
af4f4c465a Add maintenance notice 2022-10-06 21:27:52 +01:00
39 changed files with 893 additions and 177 deletions

5
.dockerignore Normal file
View File

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

View File

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

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>

40
conf/deploy.sh Normal file
View File

@ -0,0 +1,40 @@
#!/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

57
conf/nginx.conf Normal file
View File

@ -0,0 +1,57 @@
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,10 +11,10 @@
<body> <body>
<!-- Popup Menu --> <!-- Popup Menu -->
<?php require "./page-blocks/nav-menu.php";?> <?php include "./page-blocks/nav-menu.php";?>
<!-- Main Content Begins --> <!-- Main Content Begins -->
<?php require "./page-blocks/title-image.php";?> <?php include "./page-blocks/title-image.php";?>
<br> <br>
<br> <br>
@ -26,6 +26,11 @@
<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>
<button class="actionbutton" onclick="gotoInfoBoard('brstltm')">BRI</button> <button class="actionbutton" onclick="gotoInfoBoard('brstltm')">BRI</button>
@ -40,12 +45,12 @@
<br> <br>
<br> <br>
<div class="text-description"> <div class="text-description">
<p>This is an Alpha release and is under testing.</p> <p>Athena has been replaced with <a href="https://owlboard.info">OwlBoard</a>.</p>
<p>Some features may not work and some stations may not be available.</p> <p>Athena will remain available for use as OwlBoard does not yet offer staff versions of boards.</p>
</div> </div>
<!-- Footer --> <!-- Footer -->
<?php include "./page-blocks/footer.php" ?> <?php include "./page-blocks/footer.php";?>
</body> </body>

View File

@ -41,29 +41,13 @@
<!-- Main Content Begins --> <!-- Main Content Begins -->
<?php require "./page-blocks/title-image.php";?> <?php require "./page-blocks/title-image.php";?>
<h1>Please help us fix your issue</h1> <h1>Athena is retiring</h1>
<p>Give as much detail as possible so we can try to fix the problem.</p> <p>It has been replaced with <a href="https://owlboard.info">OwlBoard</a>.</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>
<input class="actionbutton" type="submit">
<br>
<div class="text-description">
<p> <p>
On submission of this form, your browsers User Agent string will be Currently, OwlBoard does not offer staff versions of departure boards.
collected alongside the information you provide above and will be Because of this, Athena will not have any further issues fixed but will remain
posted to the <a class="inlinelink" href="https://git.fjla.uk/fred.boniface/athena.fb-infra.uk/issues?q=&state=open"> available until OwlBoard offers this feature.
issue tracker</a>.
</p> </p>
<br> <br>
<br> <br>

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');
}
}
}
} }

12
nginx.Dockerfile Normal file
View File

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

View File

@ -1,12 +1,10 @@
<?php <meta charset="UTF-8"/>
<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"/>
echo '<meta charset="UTF-8"/>'; <script src="/js/nav.js"></script>
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,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,3 +1,9 @@
<?php <picture>
<source media="(max-width:1000px)" srcset="/assets/title/title_355.jxl" type="image/jxl">
echo '<a href="/"><img class="titleimg" src="/assets/title/title.webp"></img></a>'; <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">
<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>

3
php.Dockerfile Normal file
View File

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

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

@ -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/php-keys/athena/gitea.php'; require '/srv/keys/athena/apiKeys.php';
// Set httpHeaders // Set httpHeaders
$httpHeaders = array( $httpHeaders = array(

View File

@ -1,2 +1,2 @@
<?php <?php
$athenaVersion = '0.4.2-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,87 +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 { 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 {
text-decoration: underline;
color: white;
}
footer a:visited {
color: white;
}
footer a:hover {
color: beige;
}