- <li style="background-image: url(/static/carousel/img1.jpg); z-index: 100;">
- <a href="{% url 'catalogue_lesson' 'jak-planowac-prace-z-informacja' %}" class="catalogue-carousel-link"></a>
- </li>
- <li style="background-image: url(/static/carousel/img2.jpg)">
- <a href="{% url 'catalogue_lesson' 'jak-planowac-prace-z-informacja' %}" class="catalogue-carousel-link"></a>
- </li>
- <li style="background-image: url(/static/carousel/img3.jpg)">
- <a href="{% url 'catalogue_lesson' 'jak-planowac-prace-z-informacja' %}" class="catalogue-carousel-link"></a>
- </li>
- <li style="background-image: url(/static/carousel/img4.jpg)">
- <a href="{% url 'catalogue_lesson' 'jak-planowac-prace-z-informacja' %}" class="catalogue-carousel-link"></a>
- </li>
+ {% for section in object_list %}
+ <li style="{% if section.pic %}{% thumbnail section.pic '460x235' crop='center' as th %}background-image: url('{{ th.url }}');{% endthumbnail %}{% endif %}">
+ <a href="{{ lessons }}#gimnazjum_{{ section.slug }}" class="catalogue-carousel-link">
+ <div class="catalogue-carousel-note">
+ <div>
+ <p>
+ <strong>{{ section }}</strong>
+ {{ section.summary }}
+ <span class="more">zobacz →</span>
+ </p>
+ </div>
+ </div>
+ </a>
+ <a class="attribution" href="{{ section.pic_src }}">fot. {{ section.pic_attribution }}</a>
+ </li>
+ {% endfor %}