From 6457471f225e446e52601ebe66208a4e7a3bef4e Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 12 Aug 2012 23:01:52 +0200 Subject: add singe display template (not used yet) --- cgi/index.pl | 121 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) diff --git a/cgi/index.pl b/cgi/index.pl index 0f3af77..0520561 100644 --- a/cgi/index.pl +++ b/cgi/index.pl @@ -215,6 +215,76 @@ __DATA__ border: 1px solid #000066; } + div.s_display { + background-color: #0000ff; + color: white; + font-family: Sans-Serif; + font-weight: bold; + position: relative; + margin-left: 1em; + margin-top: 1em; + float: left; + width: 28em; + height: 4.5em; + border: 0.7em solid #000066; + } + + div.s_display div { + overflow: hidden; + position: absolute; + } + + div.s_no_data { + top: 0.5em; + left: 1em; + font-size: 1.7em; + } + + div.s_time { + top: 0em; + left: 0em; + font-size: 1.7em; + } + + div.s_train { + left: 0em; + top: 1.8em; + } + + div.s_via { + top: 1.5em; + left: 5.8em; + width: 17em; + height: 1em; + } + + div.s_via span { + margin-right: 0.4em; + } + + div.s_destinatio { + top: 1.32em; + left: 3.2em; + width: 9.2em; + font-size: 1.8em; + height: 1em; + } + + div.s_platform { + top: 0em; + right: 0em; + font-size: 3em; + } + + div.s_info { + top: 0em; + left: 5.8em; + width: 16.5em; + height: 1em; + background-color: white; + color: #0000ff; + } + @@ -307,6 +377,57 @@ LC display in the station itself. % } +@@ single.html.ep + +
+ +% if (@{$departures}) { + +% my $i = 0; +% for my $departure (@{$departures}) { +% $i++; +
+%= $departure->{platform} +
+
+%= $departure->{time} +
+
+%= $departure->{train} +
+
+% my $via_max = @{$departure->{via}}; +% my $via_cur = 0; +% for my $stop (@{$departure->{via}}) { +% $via_cur++; +<%= $stop %><% if ($via_cur < $via_max) { %> - <% } %> +% } +
+
+%= $departure->{destinatio} +
+% if ($departure->{info}) { +
+%= $departure->{info} +
+% } + +% } +% else { + +
+Bitte Ansage beachten +
+ +
+ +

+DB-Fakedisplay displays the next departures at a DB station, just like the big +LC display in the station itself. +

+ +% } + @@ not_found.html.ep -- cgit v1.2.3