cas
[prawokultury.git] / migdal / templates / migdal / entry / entry_promobox.html
index 9b81f59..f68b487 100755 (executable)
@@ -1,11 +1,11 @@
-{% load i18n %}
+{% load i18n thumbnail %}
 
 
-<li class="promobox-item"{% if counter == 1 %} class="active"{% endif %}
+<li class="promobox-item{% if counter == 1 %} active{% endif %}"
     style="
     {% if counter != 1 %}display: none;{% endif %}
     {% if object.image %}
-        background: url('{{ object.image.url }}');
+        background: url('{% thumbnail object.image "700x1000" as thumb %}{{ thumb.url }}{% empty %}{{ object.image.url }}{% endthumbnail %}');
         background-size:100%;
         background-position: 50% 50%;
     {% else %}
@@ -21,7 +21,7 @@
 <h2>{{ object.title }}</h2>
 
 <div class="lead">
-{{ object.lead }}
+{{ object.lead|striptags|truncatewords:8 }}
 </div>
 </div>
 </div>