summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--index.pl17
-rw-r--r--public/default.css6
-rw-r--r--templates/clean.html.ep6
3 files changed, 20 insertions, 9 deletions
diff --git a/index.pl b/index.pl
index 14c5381..ad17284 100644
--- a/index.pl
+++ b/index.pl
@@ -247,14 +247,15 @@ sub handle_request {
push(
@departures,
{
- time => $result->time,
- train => $result->train,
- via => [ $result->route_interesting(3) ],
- destination => $result->destination,
- platform => $platform,
- info => $info,
- moreinfo => $moreinfo,
- delay => $delay,
+ time => $result->time,
+ train => $result->train,
+ via => [ $result->route_interesting(3) ],
+ destination => $result->destination,
+ platform => $platform,
+ info => $info,
+ is_cancelled => $result->is_cancelled,
+ moreinfo => $moreinfo,
+ delay => $delay,
}
);
}
diff --git a/public/default.css b/public/default.css
index b603966..7fc054c 100644
--- a/public/default.css
+++ b/public/default.css
@@ -120,6 +120,12 @@ div.displayclean li .dest {
overflow: hidden;
}
+div.displayclean li .cancelled {
+ text-decoration: line-through;
+ text-decoration-color: red;
+ -moz-text-decoration-color: red;
+}
+
div.displayclean li .countdown {
color:#000000;
font-size:3em;
diff --git a/templates/clean.html.ep b/templates/clean.html.ep
index 329d89d..c013cd6 100644
--- a/templates/clean.html.ep
+++ b/templates/clean.html.ep
@@ -49,7 +49,11 @@
% }
</span>
% }
-<span class="dest">
+% my $extraclasses = q{};
+% if ($departure->{is_cancelled}) {
+% $extraclasses .= ' cancelled';
+% }
+<span class="dest <%= $extraclasses %>">
%= $departure->{destination}
</span>
<span class="countdown">