diff options
-rw-r--r-- | public/infoscreen.css | 14 | ||||
-rw-r--r-- | templates/infoscreen.html.ep | 32 |
2 files changed, 43 insertions, 3 deletions
diff --git a/public/infoscreen.css b/public/infoscreen.css index 3c2752a..e7cdac8 100644 --- a/public/infoscreen.css +++ b/public/infoscreen.css @@ -159,6 +159,20 @@ div.displayclean li .moreinfo .mheader { font-size: 120%; } +div.displayclean li .moreinfo tr.routepre { + background-color: #dddddd; +} +div.displayclean li .moreinfo tr.routenow { + background-color: #eeeeee; +} +div.displayclean li .moreinfo tr.routepost { +} + +div.displayclean li .moreinfo td.time { + text-align: center; + margin-right: 0.5em; +} + div.displayclean li .moreinfo .mroute { margin-bottom: 0.6em } diff --git a/templates/infoscreen.html.ep b/templates/infoscreen.html.ep index 5495cc3..851b1d1 100644 --- a/templates/infoscreen.html.ep +++ b/templates/infoscreen.html.ep @@ -60,13 +60,39 @@ Fahrplan: <table class="scheduled"> % for my $stop ($departure->route_pre) { - <tr><td class="time"><%= $stop->{dep_time} %></td> + <tr class="routepre"><td class="time"> +% if (not defined $stop->{arr_time}) { + <%= $stop->{dep_time} %> +% } +% elsif (not defined $stop->{dep_time}) { + <%= $stop->{arr_time} %> +% } +% elsif ( $stop->{arr_time} eq $stop->{dep_time} ) { + <%= $stop->{dep_time} %> +% } +% else { + <%= $stop->{arr_time} %> → <%= $stop->{dep_time} %> +% } + </td> <td class="stop"><%= $stop->{stop} %></td></tr> % } - <tr><td class="time"></td> + <tr class="routenow"><td class="time"><%= $departure->time %></td> <td class="stop"><%= $id_name %> <%= $id_stop %></td></tr> % for my $stop ($departure->route_post) { - <tr><td class="time"><%= $stop->{arr_time} %></td> + <tr class="routepost"><td class="time"> +% if (not defined $stop->{arr_time}) { + <%= $stop->{dep_time} %> +% } +% elsif (not defined $stop->{dep_time}) { + <%= $stop->{arr_time} %> +% } +% elsif ( $stop->{arr_time} eq $stop->{dep_time} ) { + <%= $stop->{dep_time} %> +% } +% else { + <%= $stop->{arr_time} %> → <%= $stop->{dep_time} %> +% } + </td> <td class="stop"><%= $stop->{stop} %></td></tr> % } </table> |