summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCassidy Dingenskirchen <admin@15318.de>2024-01-22 19:13:46 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2024-01-29 19:59:09 +0100
commit824fb6973e1e5b85a0a4693f0fd1389a84409421 (patch)
tree00bef8c4809c3b48009591ae9341fa138d2ab223
parentdbbeaeea960d21817f35dc9236f7bc80ca8b2411 (diff)
unified train farbtupferl
(cherry picked from commit 20e8fd39851146eb4fb3cc8cb1f7ba7fc4086d8d) Signed-off-by: Birte Kristina Friesel <derf@finalrewind.org>
-rw-r--r--sass/src/common/local.scss4
-rw-r--r--templates/_checked_in.html.ep7
-rw-r--r--templates/_checked_out.html.ep3
-rw-r--r--templates/_format_train.html.ep9
-rw-r--r--templates/_history_trains.html.ep6
-rw-r--r--templates/landingpage.html.ep6
6 files changed, 18 insertions, 17 deletions
diff --git a/sass/src/common/local.scss b/sass/src/common/local.scss
index 2ca8f55..9bdcbde 100644
--- a/sass/src/common/local.scss
+++ b/sass/src/common/local.scss
@@ -118,7 +118,7 @@ ul.suggestions {
}
}
}
-.departures .dep-line {
+.dep-line {
text-align: center;
padding: .2rem;
color: white;
@@ -131,7 +131,7 @@ ul.suggestions {
width: fit-content;
min-width: 6ch;
margin: 0 auto;
-
+
&.Bus, &.RUF, &.AST {
background-color: #a3167e;
border-radius: 5rem;
diff --git a/templates/_checked_in.html.ep b/templates/_checked_in.html.ep
index 9621ba6..1a58091 100644
--- a/templates/_checked_in.html.ep
+++ b/templates/_checked_in.html.ep
@@ -7,12 +7,7 @@
<span class="card-title center-align">Ziel wählen</span>
% }
<span class="card-title center-align">
- % if ($journey->{train_line}) {
- <b><%= $journey->{train_type} %> <%= $journey->{train_line} %></b> <%= $journey->{train_no} %>
- % }
- % else {
- <%= $journey->{train_type} %> <%= $journey->{train_no} %>
- % }
+ %= include '_format_train', journey => $journey
</span>
% if ($journey->{comment}) {
<p><%= $journey->{comment} %></p>
diff --git a/templates/_checked_out.html.ep b/templates/_checked_out.html.ep
index 98db660..5a944dc 100644
--- a/templates/_checked_out.html.ep
+++ b/templates/_checked_out.html.ep
@@ -1,7 +1,8 @@
<div class="card">
<div class="card-content">
<span class="card-title">Ausgecheckt</span>
- <p>Aus <%= $journey->{train_type} %> <%= $journey->{train_no} %>
+ <p>Aus
+ %= include '_format_train', journey => $journey
bis <a href="/s/<%= $journey->{arr_eva} %>?hafas=<%= $journey->{train_id} =~ m{[|]} ? 1 : 0 %>"><%= $journey->{arr_name} %></a></p>
% if (@{stash('connections_iris') // [] } or @{stash('connections_hafas') // []}) {
<span class="card-title" style="margin-top: 2ex;">Verbindungen</span>
diff --git a/templates/_format_train.html.ep b/templates/_format_train.html.ep
index 5b61682..1d6acaa 100644
--- a/templates/_format_train.html.ep
+++ b/templates/_format_train.html.ep
@@ -1,9 +1,10 @@
% if ($journey->{extra_data}{wagonorder_pride}) {
🏳️‍🌈
% }
+<span class="dep-line <%= $journey->{train_type} // q{} %>">
+ <%= $journey->{train_type} %>
+ <%= $journey->{train_line} // $journey->{train_no}%>
+</span>
% if ($journey->{train_line}) {
- <b><%= $journey->{train_type} %> <%= $journey->{train_line} %></b> <%= $journey->{train_no} %>
-% }
-% else {
- <%= $journey->{train_type} %> <%= $journey->{train_no} %>
+ <%= $journey->{train_no} %>
% }
diff --git a/templates/_history_trains.html.ep b/templates/_history_trains.html.ep
index 6bcd8cd..51f776c 100644
--- a/templates/_history_trains.html.ep
+++ b/templates/_history_trains.html.ep
@@ -17,7 +17,11 @@
% }
<tr>
<td><%= $travel->{sched_departure}->strftime($date_format) %></td>
- <td><a href="<%= $detail_link %>"><%= $travel->{type} %> <%= $travel->{line} // $travel->{no} %></a></td>
+ <td><a href="<%= $detail_link %>">
+ <span class="dep-line <%= $travel->{type} // q{} %>">
+ <%= $travel->{type} %> <%= $travel->{line} // $travel->{no}%>
+ </span>
+ </a></td>
<td>
<a href="<%= $detail_link %>" class="unmarked">
% if (param('cancelled')) {
diff --git a/templates/landingpage.html.ep b/templates/landingpage.html.ep
index 42a46f2..b42777d 100644
--- a/templates/landingpage.html.ep
+++ b/templates/landingpage.html.ep
@@ -25,9 +25,9 @@
<div class="card-content">
<span class="card-title">Ausfall dokumentieren</span>
<p>Prinzipiell wärest du nun eingecheckt in
- <%= $status->{train_type} %> <%= $status->{train_no} %>
+ %= include '_format_train', journey => $status
ab <%= $status->{dep_name} %>, doch diese Fahrt fällt aus.
- </p>
+ </p>
<p>Falls du den Ausfall z.B. für Fahrgastrechte
dokumentieren möchtest, wähle bitte jetzt das
vorgesehene Ziel aus.</p>
@@ -75,7 +75,7 @@
% }
</div>
</div>
- <h1>Letzte Fahrten</h1>
+ <h2 style="margin-left: 0.75rem;">Letzte Fahrten</h2>
%= include '_history_trains', date_format => '%d.%m', journeys => [journeys->get(uid => current_user->{id}, limit => 5, with_datetime => 1)];
% }
% else {