fix
[wolnelektury.git] / src / catalogue / templates / catalogue / book_text.html
index a1c0b23..3953e6a 100644 (file)
@@ -1,7 +1,9 @@
 {% extends "catalogue/viewer_base.html" %}
 {% load i18n %}
 {% load catalogue_tags %}
+{% load chunks %}
 {% load thumbnail %}
+{% load annoy_banners from annoy %}
 
 
 {% block title %}{{ book.pretty_title }}{% endblock %}
   <div class="box" id="book-short">
     {% include 'catalogue/book_short.html' %}
   </div>
+
+  <div id="annoy-stubs">
+    {% annoy_banners 'book-text-intermission' %}
+
+    {% for insert in inserts %}
+      {% with text=insert.choose %}
+        <div class="dynamic-insert{% if text.image %} with-image{% endif %}" style="{% if text.background_color %}background-color: {{ text.background_color }};{% endif %}" data-paragraphs="{{ insert.paragraphs }}">
+          <a href="{% url 'club' %}">
+            <div class="text" style="{% if text.text_color %}color:{{ text.text_color }}{% endif %}">
+              {{ text.text|safe|linebreaks }}
+            </div>
+            {% if text.image %}
+              <img src="{% thumbnail text.image '120x120' as thumb %}{{ thumb.url }}{% empty %}{{ text.image.url }}{% endthumbnail %}">
+            {% endif %}
+          </a>
+        </div>
+      {% endwith %}
+    {% endfor %}
+  </div>
 {% endblock footer %}