summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerf Null <derf@finalrewind.org>2023-03-19 12:20:30 +0100
committerDerf Null <derf@finalrewind.org>2023-03-19 12:20:30 +0100
commit36eee924aa923f37619dd6329774ef368ea6ffcf (patch)
tree2ad2093e13694629cb7a5c7260dc488c01f95e47
parent402fcc4d6fc7cdfa0b547734dd379944d95ff16f (diff)
add optional announcements to travelynx.conf
-rw-r--r--examples/travelynx.conf3
-rw-r--r--templates/layouts/default.html.ep10
2 files changed, 13 insertions, 0 deletions
diff --git a/examples/travelynx.conf b/examples/travelynx.conf
index c717376..c77e40f 100644
--- a/examples/travelynx.conf
+++ b/examples/travelynx.conf
@@ -5,6 +5,9 @@
# 'localhost'. You can validate via 'perl -c travelynx.conf'.
{
+ # Optional announcement, e.g. to indicate maintenance or backend issues.
+ #announcement => 'The IRIS backend is flaky. Real-time data may not be available.',
+
# Base URL of this travelynx installation, e.g. "https://travelynx.de" for
# travelynx.de. Used to identify this travelynx instance when performing API
# requests (so API providers know whom to contact case of issues) and for
diff --git a/templates/layouts/default.html.ep b/templates/layouts/default.html.ep
index 78330ee..66dc9db 100644
--- a/templates/layouts/default.html.ep
+++ b/templates/layouts/default.html.ep
@@ -117,6 +117,16 @@
</div>
% }
+% if (app->config->{announcement}) {
+<div class="container">
+ <div class="row">
+ <div class="col s12 caution-color white-text">
+ %= app->config->{announcement}
+ </div>
+ </div>
+</div>
+% }
+
<div class="container">
% if (is_user_authenticated()) {
% my $acc = current_user();