summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/_departures_dbris.html.ep2
-rw-r--r--templates/_format_train.html.ep5
-rw-r--r--templates/_history_trains.html.ep5
-rw-r--r--templates/layouts/default.html.ep2
4 files changed, 10 insertions, 4 deletions
diff --git a/templates/_departures_dbris.html.ep b/templates/_departures_dbris.html.ep
index dbd1a70..f769f13 100644
--- a/templates/_departures_dbris.html.ep
+++ b/templates/_departures_dbris.html.ep
@@ -33,7 +33,7 @@
<i class="material-icons" aria-label="Keine Echtzeitdaten vorhanden" style="font-size: 16px;">gps_off</i>
% }
</a>
- <span class="dep-line <%= $result->type // q{} %>">
+ <span class="dep-line <%= ($result->type // q{}) =~ tr{a-zA-Z_-}{}cdr %> <%= $result->line =~ s{ ^ \D+ \K \d .* $ }{}rx %>">
%= $result->line
</span>
<span class="dep-dest">
diff --git a/templates/_format_train.html.ep b/templates/_format_train.html.ep
index cb81211..f06e905 100644
--- a/templates/_format_train.html.ep
+++ b/templates/_format_train.html.ep
@@ -1,10 +1,13 @@
% if ($journey->{extra_data}{wagonorder_pride}) {
🏳️‍🌈
% }
-<span class="dep-line <%= ($journey->{train_type} // q{}) =~ tr{a-zA-Z_-}{}cdr %>">
+<span class="dep-line <%= ($journey->{train_type} // q{}) =~ tr{a-zA-Z_-}{}cdr %> <%= ($journey->{train_line} // q{}) =~ s{ ^ \D+ \K \d .* $ }{}rx %>">
% if (not $journey->{is_motis}) {
<%= $journey->{train_type} %>
% }
+ % if ($journey->{train_type} and $journey->{train_line}) {
+ % $journey->{train_line} =~ s{ ^ \Q$journey->{train_type}\E (?= \d ) }{}x;
+ % }
<%= $journey->{train_line} // $journey->{train_no}%>
</span>
% if ($journey->{train_line}) {
diff --git a/templates/_history_trains.html.ep b/templates/_history_trains.html.ep
index 166d74d..0a9abd5 100644
--- a/templates/_history_trains.html.ep
+++ b/templates/_history_trains.html.ep
@@ -16,10 +16,13 @@
% }
<li class="collection-item">
<a href="<%= $detail_link %>">
- <span class="dep-line <%= ($travel->{type} // q{}) =~ tr{a-zA-Z_-}{}cdr %>">
+ <span class="dep-line <%= ($travel->{type} // q{}) =~ tr{a-zA-Z_-}{}cdr %> <%= ($travel->{line} // q{}) =~ s{ ^ \D+ \K \d .* $ }{}rx %>">
% if (length($travel->{type}) < 5 and not $travel->{is_motis}) {
<%= $travel->{type} %>
% }
+ % if ($travel->{type} and $travel->{line}) {
+ % $travel->{line} =~ s{ ^ \Q$travel->{type}\E (?= \d ) }{}x;
+ % }
<%= $travel->{line} // $travel->{no}%>
</span>
</a>
diff --git a/templates/layouts/default.html.ep b/templates/layouts/default.html.ep
index 81dfea0..33224bd 100644
--- a/templates/layouts/default.html.ep
+++ b/templates/layouts/default.html.ep
@@ -13,7 +13,7 @@
% while (my ($key, $value) = each %{stash('opengraph') // {}}) {
<meta property="og:<%= $key %>" content="<%= $value %>">
% }
- % my $av = 'v99'; # asset version
+ % my $av = 'v101'; # asset version
<link rel="icon" type="image/png" href="/static/<%= $av %>/icons/icon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="/static/<%= $av %>/icons/icon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/static/<%= $av %>/icons/icon-96x96.png" sizes="96x96">