Tighter sponsors html, every pageview gets ~10kB lighter.
authorRadek Czajka <radekczajka@nowoczesnapolska.org.pl>
Thu, 20 Feb 2014 13:16:21 +0000 (14:16 +0100)
committerRadek Czajka <radekczajka@nowoczesnapolska.org.pl>
Thu, 20 Feb 2014 13:16:21 +0000 (14:16 +0100)
apps/sponsors/static/sponsors/css/sponsors.css
apps/sponsors/templates/sponsors/page.html

index 16643df..f35e56d 100644 (file)
 .sponsors-page img {
     float: left;
 }
+
+.sponsors-page a {
+    display: block;
+    width: 120px;
+    height: 120px;
+    background-repeat: no-repeat;
+}
index 6340c53..5a3b38e 100644 (file)
@@ -1,15 +1,16 @@
+{% spaceless %}
+<style type="text/css">.sponsors-page a{background-image:url({{ page.sprite.url }});}</style>
 <div class="sponsors-page">
     {% for column in sponsors %}
         <div class="sponsors-column">
             <p class="sponsors-column-name">{{ column.name|default:"&nbsp;" }}</p>
             <div class='sponsor-logos'>
                 {% 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>
+                    <a href="{{ sponsor.url }}" title="{{ sponsor.description }}" style='background-position: 0px {{ offset }}px;'></a>
                 {% endfor %}
             </div>
         </div>
     {% endfor %}
     <div style="clear: both"></div>
-</div>
\ No newline at end of file
+</div>
+{% endspaceless %}