summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-03-21 08:44:32 +0100
committerDaniel Friesel <derf@finalrewind.org>2021-03-21 08:44:32 +0100
commit7f180555b22d2162ba26d62c93491f496211e537 (patch)
tree393ccaef7f481de03a5c7f3b76bd51594357a886 /templates
parent234486663dbe1712c10888121d9bf38c4cbd2cc8 (diff)
stationboard: add anchors to individual trains
Diffstat (limited to 'templates')
-rw-r--r--templates/_train_details.html.ep4
-rw-r--r--templates/app.html.ep1
2 files changed, 3 insertions, 2 deletions
diff --git a/templates/_train_details.html.ep b/templates/_train_details.html.ep
index 9aa39ac..3f03869 100644
--- a/templates/_train_details.html.ep
+++ b/templates/_train_details.html.ep
@@ -176,7 +176,7 @@
<ul class="mroute">
% for my $stop (@{$departure->{route_pre_diff}}) {
<li>
- <a href="<%= url_for('station', station => $stop->{name})->query({detailed => param('detailed')}) %>" class="
+ <a href="<%= url_for('station', station => $stop->{name})->query({detailed => param('detailed')}) %>#<%= ($departure->{train_type} // q{x}) . ($departure->{train_no} // q{x}) %>" class="
% if ($stop->{isAdditional}) {
additional-stop
% }
@@ -214,7 +214,7 @@
% }
% for my $stop (@{$departure->{route_post_diff}}) {
<li>
- <a href="<%= url_for('station', station => $stop->{name})->query({detailed => param('detailed')}) %>" class="
+ <a href="<%= url_for('station', station => $stop->{name})->query({detailed => param('detailed')}) %>#<%= ($departure->{train_type} // q{x}) . ($departure->{train_no} // q{x}) %>" class="
% if ($stop->{isAdditional}) {
additional-stop
% }
diff --git a/templates/app.html.ep b/templates/app.html.ep
index adbaa96..142159a 100644
--- a/templates/app.html.ep
+++ b/templates/app.html.ep
@@ -51,6 +51,7 @@
% else {
>
% }
+ <div class="anchor" id="<%= ($departure->{train_type} // q{x}) . ($departure->{train_no} // q{x}) %>"></div>
<div class="line <%= $departure->{linetype} %>">
% if ($departure->{train_type} and $departure->{train_no}) {
%= $departure->{train_type}