Various improvements
This commit is contained in:
parent
a8e0bd39e5
commit
2090268754
3 changed files with 13 additions and 12 deletions
|
|
@ -2,7 +2,7 @@
|
|||
{% block content %}
|
||||
<div class="card">
|
||||
<h2 style="margin-top:0">Plan your journey</h2>
|
||||
<form id="journey-form">
|
||||
<form method="get" action="{{ url_for('search') }}">
|
||||
<div style="margin-bottom:1.2rem">
|
||||
<label for="destination" style="display:block;font-weight:600;margin-bottom:0.4rem">
|
||||
Eurostar destination
|
||||
|
|
@ -32,12 +32,4 @@
|
|||
</button>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
document.getElementById('journey-form').addEventListener('submit', function(e) {
|
||||
e.preventDefault();
|
||||
const slug = this.querySelector('[name="destination"]').value;
|
||||
const date = this.querySelector('[name="travel_date"]').value;
|
||||
if (slug && date) window.location.href = '/results/' + slug + '/' + date;
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
{% block content %}
|
||||
|
||||
<p style="margin-bottom:1rem">
|
||||
<a href="/">← New search</a>
|
||||
<a href="{{ url_for('index') }}">← New search</a>
|
||||
</p>
|
||||
|
||||
<div class="card" style="margin-bottom:1.5rem">
|
||||
|
|
@ -10,11 +10,11 @@
|
|||
Bristol Temple Meads → {{ destination }}
|
||||
</h2>
|
||||
<div style="display:flex;align-items:center;gap:0.75rem;margin-bottom:0.5rem">
|
||||
<a href="/results/{{ slug }}/{{ prev_date }}"
|
||||
<a href="{{ url_for('results', slug=slug, travel_date=prev_date) }}"
|
||||
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="/results/{{ slug }}/{{ next_date }}"
|
||||
<a href="{{ url_for('results', slug=slug, travel_date=next_date) }}"
|
||||
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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue