diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2024-03-31 14:44:37 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2024-03-31 14:44:37 +0200 |
commit | 970e30202dc1caa3f81f3351b4186d8cde3ddd97 (patch) | |
tree | 3dffb1ab8642e5a380dd52fb2e0e379cf1a32c16 /templates | |
parent | 9f0d72b9d14a57479f5f6e6d15314549b47a7c2f (diff) |
HAFAS departures: add earlier / later links
Diffstat (limited to 'templates')
-rw-r--r-- | templates/departures.html.ep | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/templates/departures.html.ep b/templates/departures.html.ep index 039ec28..f3fd25e 100644 --- a/templates/departures.html.ep +++ b/templates/departures.html.ep @@ -9,19 +9,18 @@ % } </div> </div> +% if ($api_link) { <div class="row"> <div class="col s12"> - % if ($api_link) { % if (param('hafas')) { <a href="<%= $api_link %>" class="btn-small"><i class="material-icons left" aria-hidden="true">train</i>zum Schienenverkehr</a> % } % else { <a href="<%= $api_link %>" class="btn-small"><i class="material-icons left" aria-hidden="true">directions</i>zum Nahverkehr</a> % } - % } - <a class="btn-small" href="#now"><i class="material-icons left" aria-hidden="true">vertical_align_center</i>Jetzt</a> </div> </div> +% } % my $have_connections = 0; % if ($user_status->{checked_in}) { @@ -90,6 +89,25 @@ </div> </div> % } + +<div class="row"> + <div class="col s4 center-align"> + % if ($hafas) { + <a class="btn-small" href="<%= url_for('sstation', station => stash('station'))->query({hafas => 1, timestamp => $datetime->clone->subtract(hours => 1)->epoch}) %>"><i class="material-icons left" aria-hidden="true">chevron_left</i>früher</a> + % } + </div> + <div class="col s4 center-align"> + % if ($now_in_range) { + <a class="btn-small" href="#now"><i class="material-icons left" aria-hidden="true">vertical_align_center</i>Jetzt</a> + % } + </div> + <div class="col s4 center-align"> + % if ($hafas) { + <a class="btn-small" href="<%= url_for('sstation', station => stash('station'))->query({hafas => 1, timestamp => $datetime->clone->add(hours => 1)->epoch}) %>">später<i class="material-icons right" aria-hidden="true">chevron_right</i></a> + % } + </div> +</div> + <div class="row"> <div class="col s12"> <p> |