fixes #540: load all sponsors at once
[wolnelektury.git] / apps / sponsors / templates / sponsors / page.html
index 831fdb7..94f6c30 100644 (file)
@@ -1,11 +1,15 @@
-<div class="sponsors-sponsor-page">
-{% for column in sponsors %}
-       <div class="sponsors-sponsor-column" style="width: {{ column_width }}px">
-               <p class="sponsors-sponsor-column-name">{{ column.name }}</p>
-               {% for sponsor in column.sponsors %}
-                       <div class="sponsors-sponsor">{% if sponsor.url %}<a style="sponsors-sponsor-link" href="{{ sponsor.url }}" >{% endif %}<img class="sponsors-sponsor-logo" src="{{ sponsor.logo.url }}" alt="{{ sponsor.description }}"/>{% if sponsor.url %}</a>{% endif %}</div>
-               {% endfor %}
-       </div>
-{% endfor %}
-<div style="clear: both"></div>
-</div>
+<div class="sponsors-page">
+    {% for column in sponsors %}
+        <div class="sponsors-column">
+            <p class="sponsors-column-name">{{ column.name|default:"&nbsp;" }}</p>
+            <div class='sponsors'>
+                {% for offset, sponsor in column.sponsors %}
+                    <a href="{{ sponsor.url }}" title="{{ sponsor.description }}" 
+                        style='display:block; background: url({{ page.sprite.url }}) 0px {{ offset }}px no-repeat; width: 120px; height: 120px;'>
+                    </a>
+                {% endfor %}
+            </div>
+        </div>
+    {% endfor %}
+    <div style="clear: both"></div>
+</div>
\ No newline at end of file