From 11ddc957805e1a6b54e2fecbe4121d2c9e5c4a9e Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 3 Jun 2019 15:15:08 +0200 Subject: add an about page --- lib/DBInfoscreen.pm | 2 ++ lib/DBInfoscreen/Controller/Static.pm | 6 ++++++ public/static/default.css | 2 +- templates/about.html.ep | 32 ++++++++++++++++++++++++++++++++ templates/layouts/default.html.ep | 14 +++----------- 5 files changed, 44 insertions(+), 12 deletions(-) create mode 100644 templates/about.html.ep diff --git a/lib/DBInfoscreen.pm b/lib/DBInfoscreen.pm index 422a25d..548fce2 100644 --- a/lib/DBInfoscreen.pm +++ b/lib/DBInfoscreen.pm @@ -218,6 +218,8 @@ sub startup { $r->post('/_geolocation')->to('stationboard#stations_by_coordinates'); + $r->get('/_about')->to('static#about'); + $r->get('/_impressum')->to('static#imprint'); $r->get('/_wr/:train/:departure')->to('wagenreihung#wagenreihung'); diff --git a/lib/DBInfoscreen/Controller/Static.pm b/lib/DBInfoscreen/Controller/Static.pm index 434facd..ba2cd89 100644 --- a/lib/DBInfoscreen/Controller/Static.pm +++ b/lib/DBInfoscreen/Controller/Static.pm @@ -43,6 +43,12 @@ sub geolocation { ); } +sub about { + my ($self) = @_; + + $self->render( 'about', hide_opts => 1 ); +} + sub privacy { my ($self) = @_; diff --git a/public/static/default.css b/public/static/default.css index 6baaf49..869ce1e 100644 --- a/public/static/default.css +++ b/public/static/default.css @@ -994,7 +994,7 @@ div.about a { } .container { - max-width: 40em; + max-width: 60em; margin-left: auto; margin-right: auto; } diff --git a/templates/about.html.ep b/templates/about.html.ep new file mode 100644 index 0000000..9bc7138 --- /dev/null +++ b/templates/about.html.ep @@ -0,0 +1,32 @@ +
+

+ db-infoscreen + v<%= stash('version') // '???' %>
+ Entwickelt von @derfnull
+ Backends:
+ Travel::Status::DE::HAFAS + v<%= $Travel::Status::DE::HAFAS::VERSION %>
+ Travel::Status::DE::IRIS + v<%= $Travel::Status::DE::IRIS::VERSION %>
+ Haltestellendaten + © DB Station&Service AG, + Europaplatz 1, + 10557 Berlin, lizensiert unter CC-BY 4.0
+

+
+ +
+

+ Kontakt + · + Bugs? +

+
+ +% if (-e 'templates/imprint.html.ep') { +%= include 'imprint' +% } + +% if (-e 'templates/privacy.html.ep') { +%= include 'privacy' +% } diff --git a/templates/layouts/default.html.ep b/templates/layouts/default.html.ep index 32928c9..2c59b82 100644 --- a/templates/layouts/default.html.ep +++ b/templates/layouts/default.html.ep @@ -243,17 +243,9 @@ Bitte eine Station aus der Liste auswählen
-db-infoscreen -v<%= stash('version') // '???' %>
-Backends:
-Travel::Status::DE::HAFAS -v<%= $Travel::Status::DE::HAFAS::VERSION %>
-Travel::Status::DE::IRIS -v<%= $Travel::Status::DE::IRIS::VERSION %>
-Haltestellendaten -© DB Station&Service AG, -Europaplatz 1, -10557 Berlin, lizensiert unter CC-BY 4.0
+db-infoscreen +v<%= stash('version') // '???' %> +
Datenschutzerklärung · Impressum
-- cgit v1.2.3