- Support any station with direct trains to Paddington; station CRS code is now part of the URL (/results/<crs>/<slug>/<date>) - Load station list from data/direct_to_paddington.tsv; show dropdown on index page; 404 for unknown station codes - Fetch live GWR walk-on fares via api.gwr.com for all stations (SSS/SVS/SDS with restrictions already applied per train); cache 30 days - Scrape Paddington arrival platform numbers from RTT - Show unreachable morning Eurostars (before first reachable service only) - Circle line: show actual KX St Pancras arrival times (not check-in estimate) and add a second backup service in the transfer column - Widen page max-width to 1100px for longer station names Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
73 lines
2.6 KiB
HTML
73 lines
2.6 KiB
HTML
{% extends "base.html" %}
|
|
{% block content %}
|
|
<div class="card">
|
|
<h2>Plan your journey</h2>
|
|
<form method="get" action="{{ url_for('search') }}">
|
|
<div class="form-group-lg">
|
|
<label for="station_crs" class="field-label">Departure point</label>
|
|
<select id="station_crs" name="station_crs" class="form-control">
|
|
{% for name, crs in stations %}
|
|
<option value="{{ crs }}" {% if crs == 'BRI' %}selected{% endif %}>{{ name }} ({{ crs }})</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<span class="field-label">Eurostar destination</span>
|
|
<div class="destination-grid" role="radiogroup" aria-label="Eurostar destination">
|
|
{% for slug, name in destinations.items() %}
|
|
{% set city = name.replace(' Gare du Nord', '').replace(' Centraal', '').replace(' Midi', '').replace(' Europe', '') %}
|
|
<div class="destination-option">
|
|
<input
|
|
type="radio"
|
|
id="destination-{{ slug }}"
|
|
name="destination"
|
|
value="{{ slug }}"
|
|
{% if loop.first %}checked{% endif %}
|
|
required>
|
|
<label for="destination-{{ slug }}">
|
|
<strong>{{ city }}</strong>
|
|
<span>{{ name }}</span>
|
|
</label>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group-lg">
|
|
<label for="travel_date" class="field-label">
|
|
Travel date
|
|
</label>
|
|
<input type="date" id="travel_date" name="travel_date" required
|
|
min="{{ today }}" value="{{ today }}"
|
|
class="form-control">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="min_connection" class="field-label">
|
|
Minimum connection time (Paddington → St Pancras)
|
|
</label>
|
|
<select id="min_connection" name="min_connection" class="form-control">
|
|
{% for mins in valid_min_connections %}
|
|
<option value="{{ mins }}" {% if mins == 50 %}selected{% endif %}>{{ mins }} min</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
|
|
<div class="form-group-lg">
|
|
<label for="max_connection" class="field-label">
|
|
Maximum connection time (Paddington → St Pancras)
|
|
</label>
|
|
<select id="max_connection" name="max_connection" class="form-control">
|
|
{% for mins in valid_max_connections %}
|
|
<option value="{{ mins }}" {% if mins == 110 %}selected{% endif %}>{{ mins }} min</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
|
|
<button type="submit" class="btn-primary">
|
|
Search journeys
|
|
</button>
|
|
</form>
|
|
</div>
|
|
{% endblock %}
|