eurotunnel-scrape/templates/index.html

65 lines
1.5 KiB
HTML
Raw Permalink Normal View History

2023-08-08 16:17:50 +01:00
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
2023-08-08 18:57:33 +01:00
<title>Eurotunnel prices</title>
2023-08-08 16:17:50 +01:00
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-4bw+/aepP/YC94hEpVNVgiZdgIC5+VKNBQNGCHeKRQN+PtmoHDEXuppvnDJzQIu9" crossorigin="anonymous">
</head>
{% macro time(t) %}{{ t[:2] + ":" + t[2:] }}{% endmacro %}
<body>
<div class="container mt-3">
2023-08-08 18:57:33 +01:00
<h1>Eurotunnel prices</h1>
<p>All Flexi Long Stay tickets are £269. Pay an extra £40 to make a return ticket refundable.</p>
2023-08-08 16:17:50 +01:00
<div class="row">
<div class="col">
2023-08-08 18:57:33 +01:00
<h3>Out: {{ out_date.strftime("%a, %-d %b %Y") }}</h3>
2023-08-08 16:17:50 +01:00
<p>Updated: {{ out_ts.strftime("%a, %-d %b %Y at %H:%M") }}</p>
<table class="table table-sm w-auto">
<tr>
<th>Depart</th>
<th>Arrive</th>
<th class="text-end">Price</th>
</tr>
{% for t in out %}
<tr>
<td class="text-end">{{ time(t.dep) }}</td>
<td class="text-end">{{ time(t.arr) }}</td>
<td class="text-end">£{{ t.price }}</td>
</tr>
{% endfor %}
</table>
</div>
<div class="col">
2023-08-08 18:57:33 +01:00
<h3>Return: {{ back_date.strftime("%a, %-d %b %Y") }}</h3>
2023-08-08 16:17:50 +01:00
<p>Updated: {{ back_ts.strftime("%a, %-d %b %Y at %H:%M") }}</p>
<table class="table table-sm w-auto">
<tr>
<th>Depart</th>
<th>Arrive</th>
<th class="text-end">Price</th>
</tr>
{% for t in back %}
<tr>
<td class="text-end">{{ time(t.dep) }}</td>
<td class="text-end">{{ time(t.arr) }}</td>
<td class="text-end">£{{ t.price }}</td>
</tr>
{% endfor %}
</table>
</div>
</div>
</div>
</body>
</html>