templates: Improved sponsors page listing for sponsors without logos.

This commit is contained in:
Brett Smith 2020-01-23 11:53:06 -05:00
parent c46e6f539a
commit a726124475

View file

@ -15,18 +15,18 @@
{% for sponsor in level.sponsors %} {% for sponsor in level.sponsors %}
<div class="row"> <div class="row">
{% if sponsor.sponsor_logo %}
<div class="col-md-4"> <div class="col-md-4">
<h2> <h2>
{% if sponsor.sponsor_logo %}
<a href="{{ sponsor.external_url }}"> <a href="{{ sponsor.external_url }}">
<img style="width: 90%; margin-right: 10%;" src="{% thumbnail sponsor.website_logo '600x320' %}" alt="{{ sponsor.name }}" /> <img style="width: 90%; margin-right: 10%;" src="{% thumbnail sponsor.website_logo '600x320' %}" alt="{{ sponsor.name }}" />
</a> </a>
{% else %}
<a href="{{ sponsor.external_url }}">{{ sponsor.name }}</a>
{% endif %}
</h2> </h2>
</div> </div>
<div class="col-md-8"> <div class="col-md-8">
{% else %}
<div class="col-md-12">
{% endif %}
<h3><a href="{{ sponsor.external_url }}">{{ sponsor.name }}</a></h3> <h3><a href="{{ sponsor.external_url }}">{{ sponsor.name }}</a></h3>
<p>{{ sponsor.listing_text|urlize|linebreaks }}</p> <p>{{ sponsor.listing_text|urlize|linebreaks }}</p>
</div> </div>