Move to src dir.
[edumed.git] / src / catalogue / templates / catalogue / snippets / carousel.html
diff --git a/src/catalogue/templates/catalogue/snippets/carousel.html b/src/catalogue/templates/catalogue/snippets/carousel.html
new file mode 100755 (executable)
index 0000000..bb31eae
--- /dev/null
@@ -0,0 +1,27 @@
+{% load thumbnail %}
+{% url 'catalogue_lessons' as lessons %}
+<section id="catalogue-carousel">
+    <ul id="catalogue-carousel-links">
+        {% 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 &rarr;</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">
+        {% for section in object_list %}
+            <li><a href="{{ section.get_absolute_url }}">{{ section }}</a></li>
+        {% endfor %}
+    </ul>
+</section>