From 6a0f20e29f559cfecf7b2e914d989cc12d00cc35 Mon Sep 17 00:00:00 2001 From: Cassidy Dingenskirchen Date: Sun, 22 Oct 2023 14:40:17 +0200 Subject: [PATCH] departure board: now-jump button and styled hafas/iris switch button --- public/static/js/travelynx-actions.js | 4 ++++ templates/departures.html.ep | 24 +++++++++++++----------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/public/static/js/travelynx-actions.js b/public/static/js/travelynx-actions.js index e4d69dc..1b6dd8a 100644 --- a/public/static/js/travelynx-actions.js +++ b/public/static/js/travelynx-actions.js @@ -298,6 +298,10 @@ $(document).ready(function() { $('a[href]').click(function() { $('nav .preloader-wrapper').addClass('active'); }); + $('a[href="#now"]').click(function(event) { + event.preventDefault(); + $('#now')[0].scrollIntoView({behavior: "smooth", block: "center"}); + }); const elems = document.querySelectorAll('.carousel'); const instances = M.Carousel.init(elems, { fullWidth: true, diff --git a/templates/departures.html.ep b/templates/departures.html.ep index c08e986..9235600 100644 --- a/templates/departures.html.ep +++ b/templates/departures.html.ep @@ -7,18 +7,20 @@ % } -% if ($api_link) { -
-
- % if (param('hafas')) { - zum Schienenverkehr - % } - % else { - zum Nahverkehr - % } -
+
+
+ % if ($api_link) { + % if (param('hafas')) { + trainzum Schienenverkehr + % } + % else { + directionszum Nahverkehr + % } + % } + vertical_align_centerJetzt
-% } +
+ % my $have_connections = 0; % if ($user_status->{checked_in}) {