{% from "macros/links.jinja" import user_link %}

{% macro flight_title(flight) -%}
{% if flight.pilot and flight.co_pilot -%}
  {% trans distance=h.format_distance(flight.olc_classic_distance),
           date=h.format_date(flight.date_local),
           pilot=user_link(flight.pilot),
           co_pilot=user_link(flight.co_pilot) -%}
    {{ distance }} on {{ date }} <small>by {{ pilot }} and {{ co_pilot }}</small>
  {%- endtrans %}
{%- elif flight.pilot -%}
  {% trans distance=h.format_distance(flight.olc_classic_distance),
           date=h.format_date(flight.date_local),
           pilot=user_link(flight.pilot) -%}
    {{ distance }} on {{ date }} <small>by {{ pilot }}</small>
  {%- endtrans %}
{%- else -%}
  {% trans distance=h.format_distance(flight.olc_classic_distance),
           date=h.format_date(flight.date_local) -%}
    {{ distance }} on {{ date }}
  {%- endtrans %}
{%- endif %}
{%- endmacro %}

{% from "macros/links.jinja" import user_link %}

{% macro flight_title(flight) -%}
{% if flight.pilot and flight.co_pilot -%}
  {% trans distance=h.format_distance(flight.olc_classic_distance),
           date=h.format_date(flight.date_local),
           pilot=user_link(flight.pilot),
           co_pilot=user_link(flight.co_pilot) -%}
    {{ distance }} on {{ date }} <br class="visible-xs visible-sm"/><small>by {{ pilot }} and {{ co_pilot }}</small>
  {%- endtrans %}
{%- elif flight.pilot -%}
  {% trans distance=h.format_distance(flight.olc_classic_distance),
           date=h.format_date(flight.date_local),
           pilot=user_link(flight.pilot) -%}
    {{ distance }} on {{ date }} <br class="visible-xs visible-sm"/><small>by {{ pilot }}</small>
  {%- endtrans %}
{%- else -%}
  {% trans distance=h.format_distance(flight.olc_classic_distance),
           date=h.format_date(flight.date_local) -%}
    {{ distance }} on {{ date }}
  {%- endtrans %}
{%- endif %}
{%- endmacro %}

Break flight title on small screens manually
css: Break flight title on small screens manually
