Nicer search, minor fixes.
[wolnelektury.git] / src / catalogue / templates / catalogue / 2022 / book_box.html
index dd3b8fd..97c61d9 100644 (file)
@@ -1,12 +1,14 @@
 {% load sorl_thumbnail %}
 
 <article class="l-books__item book-container-activator" data-pop="-{{ book.popularity.count }}" data-longpress="hover">
-  <figure class="l-books__item__img book-container book-container-{{ book.pk }}" style="height:240px" data-book="{{ book.pk }}">
+  <figure class="l-books__item__img book-container book-container-{{ book.pk }}" data-book="{{ book.pk }}">
     <a href="{{ book.get_absolute_url }}">
       {% if book.is_picture %}
         {% if book.image_file %}
           {% thumbnail book.image_file "170x240" crop="center" as im %}
-          <img style="float: left; margin:{{ im|margin:"170x240" }}" src="{{ im.url }}" width="{{ im.x }}" height="{{ im.y }}" />
+          <img src="{{ im.url }}"
+               srcset="{{ im.url }} 1x, {{ im.url|resolution:"2x" }} 2x"
+               width="{{ im.x }}" height="{{ im.y }}" />
           {% endthumbnail %}
         {% endif %}
       {% else %}
     {% endif %}
     <a href="{{ book.get_absolute_url }}" class="icon icon-like" data-book="{{ book.pk }}" data-book-slug="{{ book.slug }}"></a>
   </div>
-  <h3>
+  <h3 class="s">
     {% for author in book.authors %}
       <a href="{{ author.get_absolute_url }}">{{ author }}</a>{% if not forloop.last %}, {% endif %}
     {% endfor %}
   </h3>
-  <h2><a href="{{ book.get_absolute_url }}">{{ book.title }}</a></h2>
+  <h2 class="s"><a href="{{ book.get_absolute_url }}">{{ book.title }}</a></h2>
+  <span class="other-info s">
+    {% for kind in book.kinds %}{{ kind }} {% endfor %}
+    {% for genre in book.genres %}{{ genre }} {% endfor %}
+    {% for epoch in book.epochs %}{{ epoch }} {% endfor %}
+  </span>
 </article>