-{% load url from future %}
-
+{% load thumbnail %}
+{% url 'catalogue_lessons' as lessons %}
<section id="catalogue-carousel">
<ul id="catalogue-carousel-links">
- <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 %}
</ul>
<ul id="catalogue-carousel-switcher">
- <li><a href="{% url 'catalogue_lesson' 'jak-planowac-prace-z-informacja' %}" class="knowledge">wiedza w pigułce</a></li>
- <li><a href="{% url 'catalogue_lesson' 'jak-planowac-prace-z-informacja' %}" class="activity">ćwiczenia</a></li>
- <li><a href="{% url 'catalogue_lesson' 'jak-planowac-prace-z-informacja' %}" class="lesson-plan">scenariusze</a></li>
- <li><a href="{% url 'catalogue_lesson' 'jak-planowac-prace-z-informacja' %}" class="reference">słowniczek</a></li>
+ {% for section in object_list %}
+ <li><a href="{{ section.get_absolute_url }}">{{ section }}</a></li>
+ {% endfor %}
</ul>
</section>