From 36eee924aa923f37619dd6329774ef368ea6ffcf Mon Sep 17 00:00:00 2001 From: Derf Null Date: Sun, 19 Mar 2023 12:20:30 +0100 Subject: [PATCH] add optional announcements to travelynx.conf --- examples/travelynx.conf | 3 +++ templates/layouts/default.html.ep | 10 ++++++++++ 2 files changed, 13 insertions(+) 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 @@ % } +% if (app->config->{announcement}) { +
+
+
+ %= app->config->{announcement} +
+
+
+% } +
% if (is_user_authenticated()) { % my $acc = current_user();