{% load i18n %}
{% if service %}
{% firstof service_colour service_ou_colour as colour %}
{% firstof service.home_url service.ou.home_url as home_url %}
{% firstof service.name service.ou.name as name %}

{% if show_service_infos and home_url %}
{% block service-colour %}
{% if colour %}
<style>
a.service-message--link {
    color: {{ colour }};
}
</style>
{% endif %}
{% endblock %}

<div class="service-message">
  {% firstof service_logo_url service_ou_logo_url as logo_url %}
  {% block service-logo %}
  {% if logo_url %}
  <picture>
    <a href="{{ home_url }}"><img src="{{ logo_url }}" alt="{{ name }}" class="service-message--logo" /></a>
  </picture>
  {% endif %}
  {% endblock %}

  <div>
    <a href="{{ home_url }}" class="service-message--link">
      {% block service-name-pre %}{% endblock %}
      {% block service-name %}{{ name }}{% endblock %}
      {% block service-name-post %}{% endblock %}
    </a>
  </div>
</div>
{% endif %}

{% endif %}
