diff options
author | Daniel Friesel <derf@finalrewind.org> | 2012-08-12 23:01:52 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2012-08-12 23:01:52 +0200 |
commit | 6457471f225e446e52601ebe66208a4e7a3bef4e (patch) | |
tree | 1db7efb22c40bbc35d6f268fd7dbbff53ab53e1f /cgi | |
parent | 0cf1c5d658bd816a673cb35e08b7e03050150b24 (diff) |
add singe display template (not used yet)
Diffstat (limited to 'cgi')
-rw-r--r-- | cgi/index.pl | 121 |
1 files changed, 121 insertions, 0 deletions
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; + } + </style> </head> <body> @@ -307,6 +377,57 @@ LC display in the station itself. % } +@@ single.html.ep + +<div class="s_display"> + +% if (@{$departures}) { + +% my $i = 0; +% for my $departure (@{$departures}) { +% $i++; +<div class="s_platform"> +%= $departure->{platform} +</div> +<div class="s_time"> +%= $departure->{time} +</div> +<div class="s_train"> +%= $departure->{train} +</div> +<div class="s_via"> +% my $via_max = @{$departure->{via}}; +% my $via_cur = 0; +% for my $stop (@{$departure->{via}}) { +% $via_cur++; +<span><%= $stop %><% if ($via_cur < $via_max) { %> - <% } %></span> +% } +</div> +<div class="s_destination"> +%= $departure->{destinatio} +</div> +% if ($departure->{info}) { +<div class="s_info"> +%= $departure->{info} +</div> +% } + +% } +% else { + +<div class="s_no_data"> +Bitte Ansage beachten +</div> + +</div> <!-- s_display --> + +<p> +DB-Fakedisplay displays the next departures at a DB station, just like the big +LC display in the station itself. +</p> + +% } + @@ not_found.html.ep <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |