{% if latestSponsors is defined and latestSponsors|length > 0 %}
<div class="bg-white">
<div class="container" id="latest-sponsors">
<div class="row">
<div class="col-12 text-center mt-5 mb-5">
<h1 class="primary">Letzte Sponsoren</h1>
</div>
</div>
<div class="row align-items-stretch">
{% for sponsor in latestSponsors %}
{% set sponsorName = sponsor.address.company is not empty
? sponsor.address.company
: sponsor.person.firstname~' '~sponsor.person.lastname
%}
<div class="col-12 col-sm-6 col-md-3 align-self-center align-self-stretch pb-3">
<div class="item text-center p-2">
{% if sponsor.contact.url != '' %}<a href="{{ sponsor.contact.url }}" target="_blank">{% endif %}
{% if sponsor.image.id is defined %}
<img src="{{ sponsor.image.src }}" class="img-sponsor-thumb p-2" alt="{{ sponsorName }}" />
{% else %}
<span class="h3">{{ sponsorName }}</span>
{% endif %}
{% if sponsor.contact.url != '' %}</a>{% endif %}
</div>
</div>
{% endfor %}
</div>
<div class="row mt-3 mb-5">
<div class="col-12 text-end">
<a href="{{ path('app_frontend_sponsor_list') }}#sponsor-list" class="btn direction-btn btn-customer">Alle Sponsoren ansehen</a>
</div>
</div>
</div>
</div>
{% endif %}