Show links to flight data web sites

This commit is contained in:
Edward Betts 2024-06-02 19:01:18 +01:00
parent 537a84ff67
commit ade6989300

View file

@ -124,6 +124,8 @@
– –
{{ e.end_loc }} {{ e.end_country.flag }} {{ e.end_loc }} {{ e.end_country.flag }}
{% if e.element_type == "flight" %} {% if e.element_type == "flight" %}
{% set full_flight_number = e.detail.airline + e.detail.flight_number %}
{% set radarbox_url = "https://www.radarbox.com/data/flights/" + full_flight_number %}
<span class="text-nowrap"><strong>airline:</strong> {{ e.detail.airline_name }}</span> <span class="text-nowrap"><strong>airline:</strong> {{ e.detail.airline_name }}</span>
<span class="text-nowrap"><strong>flight number:</strong> {{ e.detail.airline }}{{ e.detail.flight_number }}</span> <span class="text-nowrap"><strong>flight number:</strong> {{ e.detail.airline }}{{ e.detail.flight_number }}</span>
{% if e.detail.duration %} {% if e.detail.duration %}
@ -134,6 +136,11 @@
{% if e.detail.distance %} {% if e.detail.distance %}
<span class="text-nowrap"><strong>distance:</strong> {{ format_distance(e.detail.distance) }}</span> <span class="text-nowrap"><strong>distance:</strong> {{ format_distance(e.detail.distance) }}</span>
{% endif %} {% endif %}
{% if e.element_type == "flight" %}
<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>
{% endif %}
</div> </div>
{% endif %} {% endif %}
{% endfor %} {% endfor %}