Cleanup
[wolnelektury.git] / src / catalogue / templates / catalogue / author_box.html
diff --git a/src/catalogue/templates/catalogue/author_box.html b/src/catalogue/templates/catalogue/author_box.html
new file mode 100644 (file)
index 0000000..3b474bf
--- /dev/null
@@ -0,0 +1,32 @@
+<div class="row">
+  <h2>
+    {% if tag.category == 'author' %}O autorze
+    {% elif tag.category == 'kind' %}O rodzaju
+    {% elif tag.category == 'genre' %}O gatunku
+    {% elif tag.category == 'epoch' %}O epoce
+    {% elif tag.category == 'set' %}Półka
+    {% endif %}
+  </h2>
+  <div>
+    {% if tag.photo %}
+      <figure class="l-author__photo">
+        <img src="{{ tag.photo.url }}" alt="{{ tag.name }}">
+        <figcaption>
+          {{ tag.photo_attribution|safe }}
+        </figcaption>
+      </figure>
+    {% endif %}
+    <article class="l-author__info">
+      {% if tag.category == 'set' %}
+        {% load chunks %}
+        {% chunk 'polka-how-to' %}
+      {% else %}
+      <h3><a href="{{ tag.get_absolute_url }}">{{ tag.name }}</a></h3>
+      <div class="l-article__overlay" data-max-height="327">
+        {{ tag.description|safe }}
+      </div>
+      <button class="l-article__read-more" aria-label="Kliknij aby rozwinąć" data-label="Czytaj więcej" data-action="Zwiń tekst">Czytaj więcej</button>
+      {% endif %}
+    </article>
+  </div>
+</div>