summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/departure_list.html2
-rw-r--r--templates/departures_page.html2
-rw-r--r--templates/header.html4
-rw-r--r--templates/landing_page.html2
-rw-r--r--templates/tripinfo.html72
-rw-r--r--templates/tripinfo_page.html32
6 files changed, 109 insertions, 5 deletions
diff --git a/templates/departure_list.html b/templates/departure_list.html
index 801e6d2..3df1e65 100644
--- a/templates/departure_list.html
+++ b/templates/departure_list.html
@@ -1,6 +1,6 @@
{% for departure in departures %}
<li class="{{ departure.classes }}" data-timestamp="{{ departure.sort_by }}">
- <a href="https://dbf.finalrewind.org/map/{{ departure.tripId }}/0?from={{ departure.quoted_stop_name }}">
+ <a href="/trip/{{ departure.tripId }}?line={{ departure.quoted_line_name }}&amp;highlight={{ departure.quoted_stop_name }}&amp;platform={{ departure.quoted_platform() }}">
<span class="line {{ departure.line.css_class }}">{{ departure.line.name }}</span>
{% if departure.suffix %}
<span class="destsuffix">{{ departure.suffix }}</span>
diff --git a/templates/departures_page.html b/templates/departures_page.html
index 605acff..eeceb76 100644
--- a/templates/departures_page.html
+++ b/templates/departures_page.html
@@ -3,7 +3,7 @@
<head>
<title>{{ title }}</title>
{% include 'header.html' %}
- <script src="/static/v5/js/reload.js"></script>
+ <script src="/static/v6/js/reload.js"></script>
</head>
<body>
diff --git a/templates/header.html b/templates/header.html
index 9f57312..14953fe 100644
--- a/templates/header.html
+++ b/templates/header.html
@@ -12,11 +12,11 @@
<link rel="apple-touch-icon" sizes="152x152" href="/static/icons/icon-152x152.png">
<link rel="apple-touch-icon" sizes="167x167" href="/static/icons/icon-167x167.png">
-->
-<link href="/static/v5/css/light.min.css" id="theme" rel="stylesheet">
+<link href="/static/v6/css/light.min.css" id="theme" rel="stylesheet">
<script>
function addStyleSheet(name, id) {
- const path = "/static/v5/css/" + name + ".min.css";
+ const path = "/static/v6/css/" + name + ".min.css";
const old = document.getElementById(id);
if (old && (old.href != path)) {
old.href = path;
diff --git a/templates/landing_page.html b/templates/landing_page.html
index 045007a..063b49c 100644
--- a/templates/landing_page.html
+++ b/templates/landing_page.html
@@ -3,7 +3,7 @@
<head>
<title>{{ title }}</title>
{% include 'header.html' %}
- <script src="/static/v5/js/geolocation.js"></script>
+ <script src="/static/v6/js/geolocation.js"></script>
</head>
<body>
{% include 'navbar.html' %}
diff --git a/templates/tripinfo.html b/templates/tripinfo.html
new file mode 100644
index 0000000..bfe46d0
--- /dev/null
+++ b/templates/tripinfo.html
@@ -0,0 +1,72 @@
+<div class="dataline">
+
+<div><div class="arrival">
+{% if tripinfo.arrival %}
+An:
+{% if tripinfo.arrivalDelay %}
+<span class="delay">{{ tripinfo.arrival.strftime('%H:%M') }}</span>
+<br/>Plan: {{ tripinfo.plannedArrival.strftime('%H:%M') }}
+{% else %}
+{{ tripinfo.arrival.strftime('%H:%M') }}
+{% endif %}
+{% endif %}
+</div></div>
+
+<div><div class="platform">
+{% if tripinfo.platform %}
+Steig {{ tripinfo.platform }}
+{% else %}
+&nbsp;
+{% endif %}
+</div></div>
+
+<div><div class="departure">
+{% if tripinfo.arrival %}
+Ab:
+{% if tripinfo.departureDelay %}
+<span class="delay">{{ tripinfo.departure.strftime('%H:%M') }}</span>
+<br/>Plan: {{ tripinfo.plannedDeparture.strftime('%H:%M') }}
+{% else %}
+{{ tripinfo.departure.strftime('%H:%M') }}
+{% endif %}
+{% endif %}
+</div></div>
+
+</div>
+
+<div class="linklist">
+{% if tripinfo.quoted_where %}
+<a class="smallbutton" href="https://dbf.finalrewind.org/map/{{ tripinfo.id }}/0?from={{ tripinfo.quoted_where }}"><i class="material-icons" aria-hidden="true">map</i> Karte</a>
+{% else %}
+<a class="smallbutton" href="https://dbf.finalrewind.org/map/{{ tripinfo.id }}/0"><i class="material-icons" aria-hidden="true">map</i> Karte</a>
+{% endif %}
+<div>
+
+<div class="route">
+Fahrtverlauf:
+<ul>
+{% for stopover in tripinfo.stopovers %}
+ <li class="
+ {% if stopover.is_future %}
+ future-stop
+ {% else %}
+ past-stop
+ {% endif %}
+ {% if stopover.cancelled %}
+ cancelled-stop
+ {% endif %}
+ ">
+ {% if stopover.when %}
+ {{ stopover.when.strftime('%H:%M') }}
+ {% elif stopover.plannedWhen %}
+ {{ stopover.plannedWhen.strftime('%H:%M') }}
+ {% endif %}
+ {% if stopover.is_requested_stop %}
+ <span class="this-stop">{{ stopover.name }}</span>
+ {% else %}
+ {{ stopover.name }}
+ {% endif %}
+ </li>
+{% endfor %}
+</ul>
+</div>
diff --git a/templates/tripinfo_page.html b/templates/tripinfo_page.html
new file mode 100644
index 0000000..cd04367
--- /dev/null
+++ b/templates/tripinfo_page.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html lang="de">
+<head>
+ <title>{{ title }}</title>
+ {% include 'header.html' %}
+ <!--<script src="/static/v6/js/reload.js"></script>-->
+</head>
+<body>
+
+{% include 'navbar.html' %}
+
+<div class="container">
+ <div class="content">
+ {% if warning %}
+ <div class="content">
+ <div class="warning">
+ <strong>{{ warning["lead"] }}</strong>
+ {{ warning["body"] }}
+ <div class="errcode">{{ warning["code"] }}</div>
+ </div>
+ </div>
+ {% endif %}
+ <div class="tripinfo" id="tripinfo">
+ {% include 'tripinfo.html' %}
+ </div>
+ </div>
+</div>
+
+{% include 'footer.html' %}
+
+</body>
+</html>