From 6ed6a1778f4f9710edca3908b38ead7204362552 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 22 Oct 2014 22:19:12 +0200 Subject: clean template: show S-Bahn lines with a special color and background MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (Öffi-style) --- public/default.css | 22 ++++++++++++++++++++++ templates/clean.html.ep | 6 +++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/public/default.css b/public/default.css index 3d19c50..b603966 100644 --- a/public/default.css +++ b/public/default.css @@ -42,6 +42,28 @@ div.displayclean li .line { left:2px; } +div.displayclean li .tram { + background-color: #CC0000; +} + +div.displayclean li .sbahn { + background-color:#006E10; + -webkit-border-radius: 30px; + -moz-border-radius: 30px; + border-radius: 30px; +} + +div.displayclean li .ubahn { + background-color:#001090; +} + +div.displayclean li .bus { + background-color:#991199; + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + border-radius: 10px; +} + div.displayclean li .route { color:#444444; font-size:2.1em; diff --git a/templates/clean.html.ep b/templates/clean.html.ep index ae1167c..329d89d 100644 --- a/templates/clean.html.ep +++ b/templates/clean.html.ep @@ -7,7 +7,11 @@ % $i++;
  • - +% my $linetype = q{}; +% if ( $departure->{train} =~ m{ ^ S \s? \d{1,2} $ }x ) { +% $linetype = 'sbahn'; +% } + %= $departure->{train} % if ($departure->{moreinfo} and @{$departure->{moreinfo}}) { -- cgit v1.2.3