Link to more flight info sites

This commit is contained in:
Edward Betts 2024-01-14 18:16:20 +00:00
parent 283a9d0b27
commit f60a1a329c
4 changed files with 14 additions and 8 deletions

View file

@ -73,7 +73,7 @@
{% macro flight_row(item) %}
{% set full_flight_number = item.airline + item.flight_number %}
{% set url = "https://www.radarbox.com/data/flights/" + full_flight_number %}
{% set radarbox_url = "https://www.radarbox.com/data/flights/" + full_flight_number %}
<div class="grid-item text-end">{{ item.depart.strftime("%a, %d %b %Y") }}</div>
<div class="grid-item">{{ item.from }} &rarr; {{ item.to }}</div>
<div class="grid-item">{{ item.depart.strftime("%H:%M") }}</div>
@ -84,10 +84,13 @@
{% endif %}
</div>
<div class="grid-item">{{ item.duration }}</div>
<div class="grid-item">
<a href="{{ url }}">{{ full_flight_number }}</a>
</div>
<div class="grid-item">{{ full_flight_number }}</div>
<div class="grid-item">{{ item.booking_reference }}</div>
<div class="grid-item">
<a href="https://www.flightradar24.com/data/flights/{{ full_flight_number | lower }}">flightradar24</a>
| <a href="https://uk.flightaware.com/live/flight/{{ full_flight_number | replace("U2", "EZY") }}">FlightAware</a>
| <a href="{{ radarbox_url }}">radarbox</a>
</div>
{% endmacro %}
{% macro train_row(item) %}
@ -103,4 +106,5 @@
<div class="grid-item">{{ ((item.arrive - item.depart).total_seconds() // 60) | int }} mins</div>
<div class="grid-item">{{ item.operator }}</div>
<div class="grid-item">{{ item.booking_reference }}</div>
<div class="grid-item"></div>
{% endmacro %}

View file

@ -5,14 +5,14 @@
<style>
.grid-container {
display: grid;
grid-template-columns: repeat(7, auto); /* 7 columns for each piece of information */
grid-template-columns: repeat(8, auto);
gap: 10px;
justify-content: start;
}
.train-grid-container {
display: grid;
grid-template-columns: repeat(7, auto); /* 7 columns for each piece of information */
grid-template-columns: repeat(8, auto);
gap: 10px;
justify-content: start;
}
@ -39,6 +39,7 @@
<div class="grid-item">duration</div>
<div class="grid-item">flight</div>
<div class="grid-item">reference</div>
<div class="grid-item">tracking</div>
{% for item in flights | sort(attribute="depart") %}
{{ flight_row(item) }}
@ -55,6 +56,7 @@
<div class="grid-item">duration</div>
<div class="grid-item">operator</div>
<div class="grid-item">reference</div>
<div class="grid-item"></div>
{% for item in trains | sort(attribute="depart") %}
{{ train_row(item) }}

View file

@ -12,7 +12,7 @@
{% set conference_column_count = 6 %}
{% set accommodation_column_count = 7 %}
{% set travel_column_count = 7 %}
{% set travel_column_count = 8 %}
<style>
.conferences {
display: grid;

View file

@ -14,7 +14,7 @@
{% set conference_column_count = 6 %}
{% set accommodation_column_count = 7 %}
{% set travel_column_count = 7 %}
{% set travel_column_count = 8 %}
<style>
.conferences {
display: grid;