716a4b5d543782b6a128aa51bba388869d0c6db1
[wolnelektury.git] / src / catalogue / templates / catalogue / 2022 / author_detail.html
1 {% extends '2022/base.html' %}
2 {% load catalogue_tags %}
3
4 {% load choose_cites from social_tags %}
5
6
7 {% block breadcrumbs %}
8   <a href="/katalog/"><span>Katalog</span></a>
9   {% if tags %}
10     <a href="{{ tags.0.get_absolute_catalogue_url }}"><span>{{ tags.0.get_category_display|title }}</span></a>
11   {% endif %}
12 {% endblock %}
13
14 {% block main %}
15   <div class="l-section">
16     <div class="l-author__header">
17       {% if tags.0.photo %}
18         <figure>
19           <img src="{{ tags.0.photo.url }}" alt="{{ tags.0.name }}">
20         </figure>
21       {% endif %}
22       <h1>
23         {% if tags %}
24           {{ tags.0.name }}
25         {% else %}
26           {{ title }}
27         {% endif %}
28       </h1>
29     </div>
30   </div>
31
32   <div class="l-section">
33     <div class="l-books__header">
34       <div class="l-books__input">
35         <i class="icon icon-filter"></i>
36         <input type="text" placeholder="filtry, tytuł" class="quick-filter" data-for="book-list" data-filters="with-filter">
37         <div class="filter-container">
38           {% for tag in tags %}
39             {% if forloop.counter > 1 %}
40               <span class="filter filter-category-{{ tag.category }}">
41                 <a href="{% catalogue_url list_type tag %}">{{ tag }}</a>
42                 <a href="{% catalogue_url list_type tags -tag %}">✖</a>
43               </span>
44             {% endif %}
45           {% endfor %}
46         </div>
47
48   </span>
49       </div>
50       <div class="l-books__sorting">
51         <span>Sortuj:</span>
52         <div>
53           <button data-order="data-pop">najpopularniejsze</button>
54           <button class="is-active">alfabetycznie</button>
55           <!--button>chronologicznie</button-->
56         </div>
57       </div>
58     </div>
59   </div>
60   <div class="l-author with-filter">
61
62     <div class="row">
63       <h2>{% nice_title_from_tags tags categories %}</h2>
64       {% if suggest %}
65         <div class="filter-container">
66           {% for tag in suggest %}
67             <span class="filter filter-category-{{ tag.category }}">
68               <a href="{% catalogue_url list_type tags tag %}">{{ tag }}</a>
69             </span>
70           {% endfor %}
71         </div>
72       {% endif %}
73     </div>
74   </div>
75
76   <div class="l-section l-section--col">
77     <div class="l-books__grid" id="book-list">
78       {% for book in object_list %}
79         {% include "catalogue/2022/book_box.html" %}
80       {% endfor %}
81     </div>
82   </div>
83
84   {% if tags %}
85     <section class="l-section">
86       <div class="l-author">
87         {% with author=tags.0 %}
88           {% include 'catalogue/2022/author_box.html' %}
89         {% endwith %}
90         {% choose_cites 3 author=tags.0 as cites %}
91         {% if cites %}
92           <div class="row">
93             <div class="l-author__quotes">
94               <div class="l-author__quotes__slider">
95
96                 {% for fragment in cites %}
97                   <div class="l-author__quotes__slider__item">
98                     {% include "catalogue/2022/fragment_box.html" %}
99                   </div>
100                 {% endfor %}
101
102               </div>
103             </div>
104           </div>
105         {% endif %}
106       </div>
107     </section>
108     {% endif %}
109 {% endblock %}