From f12d8515e95f4ecee0f3b8586f64b8fd997a4bd9 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Thu, 25 Jul 2024 18:08:26 +0200 Subject: backend selection: -v; mark active backend --- sass/app.scss | 4 ++++ templates/_backend.html.ep | 22 ++++++++++++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/sass/app.scss b/sass/app.scss index f92d5dc..3009ac7 100644 --- a/sass/app.scss +++ b/sass/app.scss @@ -995,6 +995,10 @@ input[type="submit"]:active, box-shadow: inset 0 3px 5px rgba(0,0,0,.125); } +.button-active { + font-weight: bold; +} + .button-light { color: $fg1; background-color: $bg; diff --git a/templates/_backend.html.ep b/templates/_backend.html.ep index 159d325..2534e81 100644 --- a/templates/_backend.html.ep +++ b/templates/_backend.html.ep @@ -1,10 +1,28 @@

- Die folgenden Backends werden derzeit unterstützt: + Das Backend bestimmt die Datenquelle für Stations- und Zuginformationen. + Innerhalb Deutschlands ist Deutsche Bahn meist eine gute Wahl: IRIS-TTS kennt ausschließlich Schienenverkehr im Bahnnetz, während HAFAS auch Nahverkehr unterstützt. + Die anderen Backends bieten sich für Fahrten im Ausland oder im zugehörigen Verkehrsverbund an und sind werden teils nicht perfekt unterstützt.

+ % my $prev_type = 'IRIS-TTS'; % for my $backend (@{$backends}) { - <%= $backend->{name} %> (<%= $backend->{type} %>) + % if ($backend->{type} ne $prev_type) { + % $prev_type = $backend->{type}; +

+ % } + % my $class = 'button'; + % if (param('hafas')) { + % if ($backend->{hafas} and $backend->{shortname} eq param('hafas')) { + % $class .= ' button-active'; + % } + % } + % else { + % if (not $backend->{hafas}) { + % $class .= ' button-active'; + % } + % } + <%= $backend->{name} %> (<%= $backend->{type} %>) % }

-- cgit v1.2.3