summaryrefslogtreecommitdiff
path: root/cgi/index.pl
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-08-15 23:13:05 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-08-15 23:13:05 +0200
commit867d3514e483231d51e5b0a409674cccf9b9e180 (patch)
tree13631e6d408254082214eb5ee808d09ab8594984 /cgi/index.pl
parent02bfe08a2376269bdada4e21a5a6f86c2bd445e0 (diff)
cgi: Minor HTML/Style improvements
Diffstat (limited to 'cgi/index.pl')
-rw-r--r--cgi/index.pl35
1 files changed, 34 insertions, 1 deletions
diff --git a/cgi/index.pl b/cgi/index.pl
index 23f08f3..424f07c 100644
--- a/cgi/index.pl
+++ b/cgi/index.pl
@@ -30,6 +30,9 @@ sub get_results_for {
get '/' => sub {
my $self = shift;
my $station = $self->param('station');
+
+ $self->stash( 'version', $VERSION );
+
if ( not $station ) {
return $self->render;
}
@@ -47,6 +50,8 @@ get '/:station' => sub {
);
my @results = get_results_for($station);
+ $self->stash( 'version', $VERSION );
+
if ( not @results ) {
$self->render( 'index', error => "Got no results for '$station'", );
return;
@@ -74,7 +79,7 @@ get '/:station' => sub {
};
get '/multi/:station' => sub {
- my $self = shift;
+ my $self = shift;
my $station = $self->stash('station');
$self->redirect_to("/${station}");
};
@@ -90,6 +95,22 @@ __DATA__
<head>
<title>DB Fakedisplay</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
+ <style type="text/css">
+
+body {
+ font-family: Sans-Serif;
+}
+
+p.about {
+ color: #666666;
+}
+
+p.about a {
+ color: #000066;
+ text-decoration: none;
+}
+
+ </style>
</head>
<body>
<div>
@@ -102,11 +123,23 @@ LC display in the station itself.
Error: <%= $error %><br/>
<% } %>
<%= form_for index => begin %>
+<p>
Station name:<br/>
<%= text_field 'station' %><br/>
<%= submit_button 'Display' %>
+</p>
<% end %>
+<p>
+(For example: "Koeln Hbf" or "Essen West")
+</p>
+
+<p class="about">
+This is <a
+href="http://finalrewind.org/projects/db-fakedisplay/">db-fakedisplay</a>
+v<%= $version %>
+</p>
+
</div>
</body>
</html>