summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2014-10-22 22:19:12 +0200
committerDaniel Friesel <derf@finalrewind.org>2014-10-22 22:19:37 +0200
commit6ed6a1778f4f9710edca3908b38ead7204362552 (patch)
treeea83fa6dc5a2b9595781c05d3d486eb1328fd55c
parentc9fb127d09f9aa33427fe7fab52c176e6fcd0324 (diff)
clean template: show S-Bahn lines with a special color and background
(Öffi-style)
-rw-r--r--public/default.css22
-rw-r--r--templates/clean.html.ep6
2 files changed, 27 insertions, 1 deletions
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++;
<li>
-<span class="line">
+% my $linetype = q{};
+% if ( $departure->{train} =~ m{ ^ S \s? \d{1,2} $ }x ) {
+% $linetype = 'sbahn';
+% }
+<span class="line <%= $linetype %>">
%= $departure->{train}
</span>
% if ($departure->{moreinfo} and @{$departure->{moreinfo}}) {