summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/_public_status_card.html.ep71
-rw-r--r--templates/account.html.ep9
-rw-r--r--templates/layouts/default.html.ep2
-rw-r--r--templates/privacy.html.ep2
-rw-r--r--templates/user_status.html.ep2
5 files changed, 43 insertions, 43 deletions
diff --git a/templates/_public_status_card.html.ep b/templates/_public_status_card.html.ep
index 1b33c18..e357015 100644
--- a/templates/_public_status_card.html.ep
+++ b/templates/_public_status_card.html.ep
@@ -1,37 +1,11 @@
% if ($journey->{checked_in}) {
- <div class="card green darken-4">
- <div class="card-content white-text">
+ <div class="card white autorefresh">
+ <div class="card-content">
+ <i class="material-icons small right sync-failed-marker grey-text" style="display: none;">sync_problem</i>
<span class="card-title"><%= $name %> ist unterwegs</span>
<p>
- In <b><%= $journey->{train_type} %> <%= $journey->{train_no} %></b>
- % if ($journey->{arr_name}) {
- von <b><%= $journey->{dep_name} %></b> nach <b><%= $journey->{arr_name} %></b>.
- % }
- % else {
- ab <b><%= $journey->{dep_name} %></b>.
- % }
- </p>
- <p>
- <b><%= $journey->{real_departure}->strftime('%H:%M') %></b>
- % if ($journey->{real_departure}->epoch != $journey->{sched_departure}->epoch) {
- (<%= sprintf('%+d', ($journey->{real_departure}->epoch - $journey->{sched_departure}->epoch)/60) %>)
- % }
- →
- % if ($journey->{real_arrival}->epoch) {
- <b><%= $journey->{real_arrival}->strftime('%H:%M') %></b>
- % if ($journey->{real_arrival}->epoch != $journey->{sched_arrival}->epoch) {
- (<%= sprintf('%+d', ($journey->{real_arrival}->epoch - $journey->{sched_arrival}->epoch)/60) %>)
- % }
- % }
- % elsif ($journey->{arr_name}) {
- noch nicht bekannt
- % }
- % else {
- unbekannt
- % }
- </p>
- <p>
- <div class="center">
+ <div class="center-align">
+ <b><%= $journey->{train_type} %> <%= $journey->{train_no} %></b><br/>
% if ($journey->{departure_countdown} > 120) {
Abfahrt in <%= sprintf('%.f', $journey->{departure_countdown} / 60) %> Minuten
% }
@@ -57,8 +31,36 @@
Ankunft in mehr als zwei Stunden
% }
</div>
- <div class="progress green darken-3" style="height: 1ex;">
- <div class="determinate white" style="width: <%= sprintf('%.2f', 100 * ($journey->{journey_completion} // 0)); %>%;"></div>
+ <div class="progress grey lighten-3" style="height: 1ex;">
+ <div class="determinate blue" style="width: <%= sprintf('%.2f', 100 * ($journey->{journey_completion} // 0)); %>%;"></div>
+ </div>
+ </p>
+ <p>
+ <div style="float: left;">
+ <b><%= $journey->{dep_name} %></b><br/>
+ <b><%= $journey->{real_departure}->strftime('%H:%M') %></b>
+ % if ($journey->{real_departure}->epoch != $journey->{sched_departure}->epoch) {
+ (<%= sprintf('%+d', ($journey->{real_departure}->epoch - $journey->{sched_departure}->epoch)/60) %>)
+ % }
+ </div>
+ <div style="float: right;">
+ % if ($journey->{arr_name}) {
+ <b><%= $journey->{arr_name} %></b><br/>
+ % }
+ % else {
+ Fahrt ins Blaue<br/>
+ % }
+ % if ($journey->{real_arrival}->epoch) {
+ <b><%= $journey->{real_arrival}->strftime('%H:%M') %></b>
+ % if ($journey->{real_arrival}->epoch != $journey->{sched_arrival}->epoch) {
+ (<%= sprintf('%+d', ($journey->{real_arrival}->epoch - $journey->{sched_arrival}->epoch)/60) %>)
+ % }
+ % }
+ % elsif ($journey->{arr_name}) {
+ noch nicht bekannt
+ % }
+ </div>
+ <div style="clear: both;">
</div>
</p>
% if (@{$journey->{messages} // []} > 0 and $journey->{messages}[0]) {
@@ -76,8 +78,9 @@
</div>
% }
% else {
- <div class="card grey darken-4">
+ <div class="card grey darken-4 autorefresh">
<div class="card-content white-text">
+ <i class="material-icons small right sync-failed-marker grey-text" style="display: none;">sync_problem</i>
<span class="card-title"><%= $name %> ist gerade nicht eingecheckt</span>
<p>
Zuletzt gesehen in <%= $journey->{arr_name} %>.
diff --git a/templates/account.html.ep b/templates/account.html.ep
index fe1280f..fc4387d 100644
--- a/templates/account.html.ep
+++ b/templates/account.html.ep
@@ -37,17 +37,14 @@
<td><a href="/change_password"><i class="material-icons">edit</i></a></td>
</tr>
<tr>
- <th scope="row">Privatsphäre</th>
+ <th scope="row">Öffentliche Daten</th>
<td>
<a href="/account/privacy"><i class="material-icons">edit</i></a>
% if ($acc->{is_public} == 0) {
- Keine öffentlichen Daten
- % }
- % else {
- Öffentliche Daten:
+ Keine
% }
% if ($acc->{is_public} & 0x02) {
- Status
+ Aktueller Status
% }
</td>
</tr>
diff --git a/templates/layouts/default.html.ep b/templates/layouts/default.html.ep
index 9dfd741..d80ac3d 100644
--- a/templates/layouts/default.html.ep
+++ b/templates/layouts/default.html.ep
@@ -5,7 +5,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="theme-color" content="#673ab7">
- % my $av = 'v8'; # asset version
+ % my $av = 'v9'; # asset version
%= stylesheet "/static/${av}/css/materialize.min.css"
%= stylesheet "/static/${av}/css/material-icons.css"
%= stylesheet "/static/${av}/css/local.css"
diff --git a/templates/privacy.html.ep b/templates/privacy.html.ep
index bf509ce..9fa2048 100644
--- a/templates/privacy.html.ep
+++ b/templates/privacy.html.ep
@@ -1,4 +1,4 @@
-<h1>Privatsphäre</h1>
+<h1>Öffentliche Daten</h1>
<div class="row">
<div class="col s12">
Hier kannst du auswählen, welche Aspekte deines Accounts bzw. deiner
diff --git a/templates/user_status.html.ep b/templates/user_status.html.ep
index 7691258..2a6be03 100644
--- a/templates/user_status.html.ep
+++ b/templates/user_status.html.ep
@@ -1,5 +1,5 @@
<div class="row">
- <div class="col s12">
+ <div class="col s12 publicstatuscol" data-user="<%= $name %>">
%= include '_public_status_card', name => $name, journey => $journey
</div>
</div>