live tracking and filter
Some checks failed
Create and publish a Docker image / build-and-push-image (push) Has been cancelled
Some checks failed
Create and publish a Docker image / build-and-push-image (push) Has been cancelled
This commit is contained in:
parent
534c36b0f7
commit
f5e0a31bb7
16 changed files with 414 additions and 115 deletions
|
|
@ -27,6 +27,10 @@
|
|||
</style>
|
||||
<body>
|
||||
<div class="body">
|
||||
<div style="background-color: #ff0000; color: #ffffff; font-size: .7em; padding: 5px; margin-bottom: 10px; margin-top: 10px;">
|
||||
This website is not run by SEPTA. Data may be inaccurate.
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<div style="display: flex; justify-content: space-between;">
|
||||
<div>
|
||||
|
|
|
|||
|
|
@ -68,18 +68,19 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||
});
|
||||
</script>
|
||||
|
||||
<div style="background-color: #ff0000; color: #ffffff; padding: 15px; margin-bottom: 15px; margin-top: 15px;">
|
||||
This website is not run by SEPTA. As such, schedules may not be
|
||||
completely accurate.
|
||||
</div>
|
||||
|
||||
<div style="display: flex; align-items: center;">
|
||||
{% call scope::route_symbol(route) %}
|
||||
<h1 style="margin-left: 15px;">{{ route.name }}</h1>
|
||||
</div>
|
||||
|
||||
{% for timetable in timetables %}
|
||||
<h2>{{ timetable.direction.direction | capitalize }} to {{ timetable.direction.direction_destination }}</h2>
|
||||
<details style="margin-top: 15px;">
|
||||
<summary>
|
||||
<div style="display: inline-block;">
|
||||
<h3>{{ timetable.direction.direction | capitalize }} to</h3>
|
||||
<h2>{{ timetable.direction.direction_destination }}</h2>
|
||||
</div>
|
||||
</summary>
|
||||
<div class="tscroll">
|
||||
<table class="train-direction-table" style="margin-top: 5px;">
|
||||
<thead>
|
||||
|
|
@ -92,20 +93,37 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||
</thead>
|
||||
<tbody>
|
||||
{% for row in timetable.rows %}
|
||||
{% if let Some(filter_stop_v) = filter_stops %}
|
||||
{% if !filter_stop_v.contains(&row.stop_id) %}
|
||||
{% continue %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<tr>
|
||||
<td>{{ row.stop_name }}</td>
|
||||
{% for time in row.times %}
|
||||
<td>
|
||||
|
||||
|
||||
{% if let Some(t) = time %}
|
||||
{{ t | format_time }}
|
||||
{% let live_o = timetable.tracking_data[loop.index0] %}
|
||||
{% if let Tracked(live) = live_o %}
|
||||
{% let time = (t + (live.delay * 60.0) as i64) %}
|
||||
<td style="background-color: #003300">
|
||||
<span style="color: #22bb22"> {{ time | format_time }} </span>
|
||||
</td>
|
||||
{% elif let TripTracking::Cancelled = live_o %}
|
||||
<td style="color: #ff0000"><s>{{ t | format_time }}</s></td>
|
||||
{% else %}
|
||||
<td>{{ t | format_time }}</td>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
--
|
||||
{% endif %}
|
||||
<td>
|
||||
</td>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</details>
|
||||
{% endfor %}
|
||||
|
|
|
|||
|
|
@ -5,67 +5,44 @@
|
|||
<fieldset>
|
||||
<legend><h2>Regional Rail</h2></legend>
|
||||
<p style="margin-top: 10px; margin-bottom: 10px;">For infrequent rail service to suburban locations</p>
|
||||
<!--<h3 class="line-link">[ Pennsy ]</h3>-->
|
||||
<p class="line-link"><a href="/route/TRE">[ <b>TRE:</b> Trenton (NJT to New York) ]</a></p>
|
||||
<p class="line-link"><a href="/route/PAO">[ <b>PAO:</b> Paoli/Thorndale ]</a></p>
|
||||
<p class="line-link"><a href="/route/CYN">[ <b>CYN:</b> Cynwyd ]</a></p>
|
||||
<p class="line-link"><a href="/route/AIR">[ <b>AIR:</b> Airport ]</a></p>
|
||||
<p class="line-link"><a href="/route/WIL">[ <b>WIL:</b> Wilmington/Newark ]</a></p>
|
||||
<p class="line-link"><a href="/route/CHW">[ <b>CHW:</b> Chestnut Hill West ]</a></p>
|
||||
<p class="line-link"><a href="/route/WAW">[ <b>WAW:</b> Media/Wawa ]</a></p>
|
||||
|
||||
<!--<h3 class="line-link">[ Reading ]</h3>-->
|
||||
<p class="line-link"><a href="/route/LAN">[ <b>LAN:</b> Lansdale/Doylestown ]</a></p>
|
||||
<p class="line-link"><a href="/route/NOR">[ <b>NOR:</b> Manayunk/Norristown ]</a></p>
|
||||
<p class="line-link"><a href="/route/CHE">[ <b>CHE:</b> Chestnut Hill East ]</a></p>
|
||||
<p class="line-link"><a href="/route/FOX">[ <b>FOX:</b> Fox Chase ]</a></p>
|
||||
<p class="line-link"><a href="/route/WTF">[ <b>WTR:</b> West Trenton ]</a></p>
|
||||
<p class="line-link"><a href="/route/WAR">[ <b>WAR:</b> Warminster ]</a></p>
|
||||
{% for route in rr_routes %}
|
||||
<a href="/route/{{ route.id }}" style="display: flex; justify-content: space-between;">
|
||||
<p class="line-link">[ <b>{{ format!("{:7}", route.id) }}:</b> {{ route.name }} </p><p>]</p>
|
||||
</a>
|
||||
{% endfor %}
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend><h2>Metro</h2></legend>
|
||||
<p style="margin-top: 10px; margin-bottom: 10px;">For frequent rail service within Philadelphia and suburban locations</p>
|
||||
<p class="lines-label" style="font-weight: bold;">[ Subway/Elevated ]</p>
|
||||
<p class="line-link"><a href="/route/B1">[ <b>B1:</b> Broad Street Line Local ]</a></p>
|
||||
<p class="line-link"><a href="/route/B2">[ <b>B2:</b> Broad Street Line Express ]</a></p>
|
||||
<p class="line-link"><a href="/route/B3">[ <b>B3:</b> Broad Ridge Spur ]</a></p>
|
||||
<p class="line-link"><a href="/route/L1">[ <b>L1:</b> Market-Frankford Line ]</a></p>
|
||||
<p class="line-link"><a href="/route/S1">[ <b>S1:</b> Norristown-Airport Line ]</a></p>
|
||||
<p class="line-link"><a href="/route/S2">[ <b>S2:</b> Media-Chestnut Hill Line ]</a></p>
|
||||
<p class="line-link"><a href="/route/S3">[ <b>S3:</b> Paoli-Fox Chase Line ]</a></p>
|
||||
<p class="lines-label" style="font-weight: bold;">[ Urban Trolley ]</p>
|
||||
<p class="line-link"><a href="/route/T1">[ <b>T1:</b> Lancaster Avenue Trolley ]</a></p>
|
||||
<p class="line-link"><a href="/route/T2">[ <b>T2:</b> Baltimore Avenue Trolley ]</a></p>
|
||||
<p class="line-link"><a href="/route/T3">[ <b>T3:</b> Chester Avenue Trolley ]</a></p>
|
||||
<p class="line-link"><a href="/route/T4">[ <b>T4:</b> Woodland Avenue Trolley ]</a></p>
|
||||
<p class="line-link"><a href="/route/T5">[ <b>T5:</b> Elmwood Avenue Trolley ]</a></p>
|
||||
<p class="line-link"><a href="/route/G1">[ <b>G1:</b> Girard Avenue Trolley ]</a></p>
|
||||
<p class="lines-label" style="font-weight: bold;">[ Suburban Trolley ]</p>
|
||||
<p class="line-link"><a href="/route/D1">[ <b>D1:</b> Media Line ]</a></p>
|
||||
<p class="line-link"><a href="/route/D2">[ <b>D2:</b> Sharon Hill Line ]</a></p>
|
||||
<p class="line-link"><a href="/route/M1">[ <b>M1:</b> Norristown High Speed Line ]</a></p>
|
||||
<div class="lines-label" style="font-weight: bold; width: 100%; display: flex; justify-content: space-between;">
|
||||
<p>[ Subway/Elevated </p><p>]</p>
|
||||
</div>
|
||||
{% for route in subway_routes %}
|
||||
<a href="/route/{{ route.id }}" style="display: flex; justify-content: space-between;">
|
||||
<p class="line-link">[ <b>{{ format!("{:7}", route.id) }}:</b> {{ route.name }} </p><p>]</p>
|
||||
</a>
|
||||
{% endfor %}
|
||||
|
||||
<div class="lines-label" style="font-weight: bold; width: 100%; display: flex; justify-content: space-between;">
|
||||
<p>[ Trolleys </p><p>]</p>
|
||||
</div>
|
||||
|
||||
{% for route in trolley_routes %}
|
||||
<a href="/route/{{ route.id }}" style="display: flex; justify-content: space-between;">
|
||||
<p class="line-link">[ <b>{{ format!("{:7}", route.id) }}:</b> {{ route.name }} </p><p>]</p>
|
||||
</a>
|
||||
{% endfor %}
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend><h2>Bus</h2></legend>
|
||||
<p style="margin-top: 10px; margin-bottom: 10px;">For service of varying frequency within SEPTA's entire service area</p>
|
||||
<p class="lines-label" style="font-weight: bold;">[ Subway/Elevated ]</p>
|
||||
<p class="line-link"><a href="/route/B1">[ <b>B1:</b> Broad Street Line Local ]</a></p>
|
||||
<p class="line-link"><a href="/route/B2">[ <b>B2:</b> Broad Street Line Express ]</a></p>
|
||||
<p class="line-link"><a href="/route/B3">[ <b>B3:</b> Broad Ridge Spur ]</a></p>
|
||||
<p class="line-link"><a href="/route/L1">[ <b>L1:</b> Market-Frankford Line ]</a></p>
|
||||
<p class="lines-label" style="font-weight: bold;">[ Urban Trolley ]</p>
|
||||
<p class="line-link"><a href="/route/T1">[ <b>T1:</b> Lancaster Avenue Trolley ]</a></p>
|
||||
<p class="line-link"><a href="/route/T2">[ <b>T2:</b> Baltimore Avenue Trolley ]</a></p>
|
||||
<p class="line-link"><a href="/route/T3">[ <b>T3:</b> Chester Avenue Trolley ]</a></p>
|
||||
<p class="line-link"><a href="/route/T4">[ <b>T4:</b> Woodland Avenue Trolley ]</a></p>
|
||||
<p class="line-link"><a href="/route/T5">[ <b>T5:</b> Elmwood Avenue Trolley ]</a></p>
|
||||
<p class="line-link"><a href="/route/G1">[ <b>G1:</b> Girard Avenue Trolley ]</a></p>
|
||||
<p class="lines-label" style="font-weight: bold;">[ Suburban Trolley ]</p>
|
||||
<p class="line-link"><a href="/route/D1">[ <b>D1:</b> Media Line ]</a></p>
|
||||
<p class="line-link"><a href="/route/D2">[ <b>D2:</b> Sharon Hill Line ]</a></p>
|
||||
<p class="line-link"><a href="/route/M1">[ <b>M1:</b> Norristown High Speed Line ]</a></p>
|
||||
{% for route in bus_routes %}
|
||||
<a href="/route/{{ route.id }}" style="display: flex; justify-content: space-between;">
|
||||
<p class="line-link">[ <b>{{ format!("{:7}", route.id) }}:</b> {{ route.name }} </p><p>]</p>
|
||||
</a>
|
||||
{% endfor %}
|
||||
</fieldset>
|
||||
|
||||
<style>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue