Add option to filter launches by orbit

This commit is contained in:
Edward Betts 2024-08-05 14:03:37 +02:00
parent 8032cd2ed4
commit 23aa70bb84
2 changed files with 27 additions and 0 deletions

View file

@ -39,6 +39,21 @@
{% endfor %}
</p>
<p>Orbit:
{% if request.args.orbit %}<a href="{{ request.path }}">🗙</a>{% endif %}
{% for name, abbrev in orbits | sort %}
{% if abbrev == request.args.orbit %}
<strong>{{ name }}</strong>
{% else %}
<a href="?orbit={{ abbrev }}" class="text-nowrap">
{{ name }}
</a>
{% endif %}
{% if not loop.last %} | {% endif %}
{% endfor %}
</p>
{% for launch in launches %}
{% set highlight =" bg-primary-subtle" if launch.slug in config.FOLLOW_LAUNCHES else "" %}
{% set country = get_country(launch.country_code) %}