From 11ddc957805e1a6b54e2fecbe4121d2c9e5c4a9e Mon Sep 17 00:00:00 2001
From: Daniel Friesel <derf@finalrewind.org>
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 @@
+<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&amp;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&amp;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/>
-- 
cgit v1.2.3