9b00d8bbdafcd795499add117e3ee86c729f5a91
[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="{{ main_tag.get_absolute_catalogue_url }}"><span>{{ main_tag.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 main_tag.photo %}
18         <figure>
19           <img src="{{ main_tag.photo.url }}" alt="{{ main_tag.name }}">
20         </figure>
21       {% endif %}
22       <h1>
23         {% if main_tag %}
24           {{ main_tag.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 tag is not main_tag %}
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       </div>
49       <div class="l-books__sorting">
50         <span>Sortuj:</span>
51         <div>
52           <button data-order="data-pop">najpopularniejsze</button>
53           <button class="is-active">alfabetycznie</button>
54           <!--button>chronologicznie</button-->
55         </div>
56       </div>
57     </div>
58   </div>
59   <div class="with-filter">
60
61     <div class="row">
62       <h2>{% nice_title_from_tags tags categories %}</h2>
63       {% if suggest %}
64         <div class="filter-container">
65           {% for tag in suggest %}
66             <span class="filter filter-category-{{ tag.category }}">
67               <a href="{% catalogue_url list_type tags tag %}">{{ tag }}</a>
68             </span>
69           {% endfor %}
70         </div>
71       {% endif %}
72     </div>
73   </div>
74
75   <div class="l-section l-section--col">
76     <div class="l-books__grid" id="book-list">
77       {% for book in object_list %}
78         {% include "catalogue/2022/book_box.html" %}
79       {% endfor %}
80     </div>
81   </div>
82
83   {% if tags %}
84     <section class="l-section">
85       <div class="l-author">
86         {% with tag=main_tag %}
87           {% include 'catalogue/2022/author_box.html' %}
88         {% endwith %}
89         {% choose_cites 3 author=main_tag as cites %}
90         {% if cites %}
91           <div class="row">
92             <div class="l-author__quotes">
93               <div class="l-author__quotes__slider">
94
95                 {% for fragment in cites %}
96                   <div class="l-author__quotes__slider__item">
97                     {% include "catalogue/2022/fragment_slider_box.html" %}
98                   </div>
99                 {% endfor %}
100
101               </div>
102             </div>
103           </div>
104         {% endif %}
105       </div>
106     </section>
107     {% endif %}
108 {% endblock %}