Various improvements
This commit is contained in:
parent
876eb6a759
commit
1fa2e68b31
5 changed files with 101 additions and 8 deletions
|
|
@ -10,14 +10,47 @@
|
|||
Bristol Temple Meads → {{ destination }}
|
||||
</h2>
|
||||
<div style="display:flex;align-items:center;gap:0.75rem;margin-bottom:0.5rem">
|
||||
<a href="{{ url_for('results', slug=slug, travel_date=prev_date) }}"
|
||||
<a href="{{ url_for('results', slug=slug, travel_date=prev_date, min_connection=min_connection, max_connection=max_connection) }}"
|
||||
style="padding:0.3rem 0.75rem;border:1px solid #cbd5e0;border-radius:4px;
|
||||
text-decoration:none;color:#00539f;font-size:0.9rem">← Prev</a>
|
||||
<strong>{{ travel_date_display }}</strong>
|
||||
<a href="{{ url_for('results', slug=slug, travel_date=next_date) }}"
|
||||
<a href="{{ url_for('results', slug=slug, travel_date=next_date, min_connection=min_connection, max_connection=max_connection) }}"
|
||||
style="padding:0.3rem 0.75rem;border:1px solid #cbd5e0;border-radius:4px;
|
||||
text-decoration:none;color:#00539f;font-size:0.9rem">Next →</a>
|
||||
</div>
|
||||
<div style="margin-top:0.75rem;display:flex;gap:1.5rem;align-items:center">
|
||||
<div>
|
||||
<label for="min_conn_select" style="font-size:0.9rem;font-weight:600;margin-right:0.5rem">
|
||||
Min connection:
|
||||
</label>
|
||||
<select id="min_conn_select"
|
||||
onchange="applyConnectionFilter()"
|
||||
style="padding:0.3rem 0.6rem;font-size:0.9rem;border:1px solid #cbd5e0;border-radius:4px">
|
||||
{% for mins in valid_min_connections %}
|
||||
<option value="{{ mins }}" {% if mins == min_connection %}selected{% endif %}>{{ mins }} min</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<label for="max_conn_select" style="font-size:0.9rem;font-weight:600;margin-right:0.5rem">
|
||||
Max connection:
|
||||
</label>
|
||||
<select id="max_conn_select"
|
||||
onchange="applyConnectionFilter()"
|
||||
style="padding:0.3rem 0.6rem;font-size:0.9rem;border:1px solid #cbd5e0;border-radius:4px">
|
||||
{% for mins in valid_max_connections %}
|
||||
<option value="{{ mins }}" {% if mins == max_connection %}selected{% endif %}>{{ mins }} min</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function applyConnectionFilter() {
|
||||
var min = document.getElementById('min_conn_select').value;
|
||||
var max = document.getElementById('max_conn_select').value;
|
||||
window.location = '{{ url_for('results', slug=slug, travel_date=travel_date) }}?min_connection=' + min + '&max_connection=' + max;
|
||||
}
|
||||
</script>
|
||||
<p style="color:#4a5568;margin:0">
|
||||
{{ gwr_count }} GWR service{{ 's' if gwr_count != 1 }}
|
||||
·
|
||||
|
|
@ -96,7 +129,7 @@
|
|||
</div>
|
||||
|
||||
<p style="margin-top:1rem;font-size:0.82rem;color:#718096">
|
||||
Paddington → St Pancras connection: 60 min minimum, 2h maximum.
|
||||
Paddington → St Pancras connection: {{ min_connection }}–{{ max_connection }} min.
|
||||
Eurostar times are from the general timetable and may vary; always check
|
||||
<a href="{{ eurostar_url }}" target="_blank" rel="noopener">eurostar.com</a> to book.
|
||||
·
|
||||
|
|
@ -114,7 +147,7 @@
|
|||
{% elif eurostar_count == 0 %}
|
||||
No Eurostar services found for {{ destination }} on this date.
|
||||
{% else %}
|
||||
No GWR + Eurostar combination allows an 80-minute connection at Paddington/St Pancras.
|
||||
No GWR + Eurostar combination has at least a {{ min_connection }}-minute connection at Paddington/St Pancras.
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue