Show more detail on space launch page

This commit is contained in:
Edward Betts 2024-01-19 20:35:52 +00:00
parent e475f98dd6
commit e16e04ab51
3 changed files with 41 additions and 11 deletions

View file

@ -5,6 +5,7 @@
<h1>Space launches</h1>
{% for launch in rockets %}
{% set country = get_country(launch.country_code) %}
<div class="row">
<div class="col-md-1 text-nowrap text-md-end">{{ launch.t0_date }}
@ -17,7 +18,10 @@
<span class="d-md-none">launch status:</span>
<abbr title="{{ launch.status.name }}">{{ launch.status.abbrev }}</abbr>
</div>
<div class="col">{{ launch.rocket }}
<div class="col">
<div>
{{ country.flag }}
{{ launch.rocket }}
&ndash;
<strong>{{launch.mission.name }}</strong>
&ndash;
@ -30,14 +34,29 @@
({{ launch.launch_provider_type }})
&mdash;
{{ launch.orbit.name }} ({{ launch.orbit.abbrev }})
<br/>
{% if launch.pad_wikipedia_url %}
<a href="{{ launch.pad_wikipedia_url }}">{{ launch.pad_name }}</a>
{% else %}
{{ launch.pad_name }} {% if launch.pad_name != "Unknown Pad" %}(no Wikipedia article){% endif %}
&mdash;
{{ launch.mission.type }}
</div>
<div>
{% if launch.pad_wikipedia_url %}
<a href="{{ launch.pad_wikipedia_url }}">{{ launch.pad_name }}</a>
{% else %}
{{ launch.pad_name }} {% if launch.pad_name != "Unknown Pad" %}(no Wikipedia article){% endif %}
{% endif %}
&mdash; {{ launch.location }}
</div>
{% if launch.mission.agencies | count %}
<div>
agencies:
{% for agency in launch.mission.agencies %}
{%- if not loop.first %}, {% endif %}
<a href="{{ agency.wiki_url }}">{{agency.name }}</a>
{{ get_country(agency.country_code).flag }}
({{ agency.type }}) {# <img src="{{ agency.logo_url }}"/> #}
{% endfor %}
</div>
{% endif %}
&mdash; {{ launch.location }}<br/>
<div>
{% if launch.mission %}
{% for line in launch.mission.description.splitlines() %}
<p>{{ line }}</p>
@ -45,7 +64,7 @@
{% else %}
<p>No description.</p>
{% endif %}
</div>
</div>
</div>
{% endfor %}