Hide empty columns.
[django-sponsors.git] / sponsors / templates / sponsors / page.html
1 <div class="sponsors-page">
2     {% for column in sponsors %}
3       {% if column.sponsors %}
4         <div class="sponsors-column">
5             <p class="sponsors-column-name">{{ column.name|default:"&nbsp;" }}</p>
6             <div class='sponsor-logos'>
7                 {% for offset, sponsor in column.sponsors %}
8                     {% with sponsor.size as thumb_size %}
9                     <a href="{{ sponsor.url }}" title="{{ sponsor.description }}" 
10                         style='display:block; background: url({{ page.sprite.url }}) 0px {{ offset }}px no-repeat; width: {{ thumb_size.0 }}px; height: {{ thumb_size.1 }}px;'>
11                     </a>
12                     {% endwith %}
13                 {% endfor %}
14             </div>
15         </div>
16       {% endif %}
17     {% endfor %}
18     <div style="clear: both"></div>
19 </div>