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