diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-06-03 15:15:08 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-06-03 15:15:08 +0200 |
commit | 11ddc957805e1a6b54e2fecbe4121d2c9e5c4a9e (patch) | |
tree | e99a5dba70572b1511ced301fa9caf02448d07e0 | |
parent | b0529c9c9b88a25942b4661f370cb78669d301b3 (diff) |
add an about page
-rw-r--r-- | lib/DBInfoscreen.pm | 2 | ||||
-rw-r--r-- | lib/DBInfoscreen/Controller/Static.pm | 6 | ||||
-rw-r--r-- | public/static/default.css | 2 | ||||
-rw-r--r-- | templates/about.html.ep | 32 | ||||
-rw-r--r-- | templates/layouts/default.html.ep | 14 |
5 files changed, 44 insertions, 12 deletions
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 @@ +<div class="container"> + <p> + <a href="https://finalrewind.org/projects/db-fakedisplay/">db-infoscreen</a> + v<%= stash('version') // '???' %><br/> + Entwickelt von <a href="https://twitter.com/derfnull">@derfnull</a><br/> + Backends:<br/> + <a href="https://finalrewind.org/projects/Travel-Status-DE-DeutscheBahn/">Travel::Status::DE::HAFAS</a> + v<%= $Travel::Status::DE::HAFAS::VERSION %><br/> + <a href="https://finalrewind.org/projects/Travel-Status-DE-IRIS/">Travel::Status::DE::IRIS</a> + v<%= $Travel::Status::DE::IRIS::VERSION %><br/> + <a href="http://data.deutschebahn.com/dataset/data-haltestellen">Haltestellendaten</a> + © DB Station&Service AG, + Europaplatz 1, + 10557 Berlin, lizensiert unter CC-BY 4.0<br/> + </p> +</div> + +<div class="container"> + <p> + <a href="https://twitter.com/derfnull">Kontakt</a> + · + <a href="https://github.com/derf/db-fakedisplay/issues">Bugs?</a> + </p> +</div> + +% 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</div> <div class="container"> <div class="about"> -<a href="https://finalrewind.org/projects/db-fakedisplay/">db-infoscreen</a> -v<%= stash('version') // '???' %><br/> -Backends:<br/> -<a href="https://finalrewind.org/projects/Travel-Status-DE-DeutscheBahn/">Travel::Status::DE::HAFAS</a> -v<%= $Travel::Status::DE::HAFAS::VERSION %><br/> -<a href="https://finalrewind.org/projects/Travel-Status-DE-IRIS/">Travel::Status::DE::IRIS</a> -v<%= $Travel::Status::DE::IRIS::VERSION %><br/> -<a href="http://data.deutschebahn.com/dataset/data-haltestellen">Haltestellendaten</a> -© DB Station&Service AG, -Europaplatz 1, -10557 Berlin, lizensiert unter CC-BY 4.0<br/> +<a href="_about">db-infoscreen</a> +v<%= stash('version') // '???' %> +<br/> <a href="_datenschutz" rel="nofollow">Datenschutzerklärung</a> · <a href="_impressum" rel="nofollow">Impressum</a><br/> |