1 {% load sorl_thumbnail %}
4 <article class="l-books__item book-container-activator" data-pop="-{{ book.popularity.count }}" data-longpress="hover">
5 <figure class="l-books__item__img book-container book-container-{{ book.pk }}" data-book="{{ book.pk }}">
6 <a href="{{ book.get_absolute_url }}">
7 {% if book.is_picture %}
8 {% if book.image_file %}
9 {% thumbnail book.image_file "170x240" crop="center" as im %}
10 <img src="{{ im.url }}"
11 srcset="{{ im.url }} 1x, {{ im.url|resolution:"2x" }} 2x"
12 width="{{ im.x }}" height="{{ im.y }}" />
16 {% if book.cover_clean %}
17 <img src="{{ book.cover_clean.url }}" alt="{{ book.title }}">
22 <div class="set-tools">
23 <div class="sets"></div>
24 <form method="post" action="{% url 'social_add_set_tag' %}" class="add-set-tag">
25 {% csrf_token %} {# this needs to be copied in with JS #}
26 <input type="hidden" name="book" value="{{ book.id }}">
27 <input name="name" placeholder="{% trans 'nazwa półki' %}" />
28 <button type="submit"></button>
33 <div class="l-books__item__actions">
35 <span class="icon icon-book-alt" title="{% trans 'książka' %}"></span>
37 {% if book.has_mp3_file %}
38 <span class="icon icon-audio" title="{% trans 'audiobook' %}"></span>
40 {% if book.is_picture %}
41 <span class="icon icon-picture" title="{% trans 'obraz' %}"></span>
43 <a href="{{ book.get_absolute_url }}" class="icon icon-like" data-book="{{ book.pk }}" data-book-slug="{{ book.slug }}"></a>
46 {% for author in book.authors %}
47 <a href="{{ author.get_absolute_url }}">{{ author }}</a>{% if not forloop.last %}, {% endif %}
50 <h2 class="s"><a href="{{ book.get_absolute_url }}">{{ book.title }}</a></h2>
51 <span class="other-info s">
52 {% for kind in book.kinds %}{{ kind }} {% endfor %}
53 {% for genre in book.genres %}{{ genre }} {% endfor %}
54 {% for epoch in book.epochs %}{{ epoch }} {% endfor %}