f492251cf4c798bf1fe150d2dff6cff12bd108bf
[wolnelektury.git] / src / catalogue / templates / catalogue / 2021 / book_detail.html
1 <!doctype html>
2 {% load pipeline %}
3 {% load static %}
4 {% load choose_cite from social_tags %}
5 {% load choose_fragment license_icon from catalogue_tags %}
6 {% load catalogue_tags %}
7
8
9 <html class="no-js">
10   <head>
11     <meta charset="utf-8">
12     <meta name="description" content="">
13     <meta name="viewport" content="width=device-width,initial-scale=1">
14     <title>WolneLektury.pl</title>
15     <link rel="apple-touch-icon" href="apple-touch-icon.png">
16
17     {% stylesheet '2021' %}
18     <script src="scripts/modernizr.js"></script>
19
20     <link rel="preconnect" href="https://fonts.googleapis.com">
21     <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
22     <link href="https://fonts.googleapis.com/css2?family=Merriweather:wght@300&family=Roboto:wght@400;700&display=swap" rel="stylesheet">
23   </head>
24   <body>
25
26     <nav class="l-navigation">
27       <a href="/" class="l-navigation__logo">
28         <img src="{% static '2021/images/logo.png' %}" alt="WolneLektury.pl">
29       </a>
30       <button class="l-navigation__button js-menu" aria-label="Menu">
31         <span class="c-hamburger">
32             <span class="bar"></span>
33         </span>
34       </button>
35     </nav>
36
37     <header class="l-header">
38       <figure class="l-header__img">
39         <img src="{% if book.cover_thumb %}{{ book.cover_thumb.url }}{% endif %}" alt="{{ book.pretty_title }}">
40       </figure>
41       <div class="l-header__content">
42         <p>
43           {% for author in book.authors %}
44             <a href="{{ author.get_absolute_url  }}">{{ author }}</a>{% if not forloop.last %}, {% endif %}
45           {% endfor %}
46           {% if book.translators %}
47             (tłum. {% for translator in book.translators %}{{ translator }}{% endfor %})
48           {% endif %}
49         </p>
50         <h1>{{ book.title }}</h1>
51         <ul>
52           {# Wielkość liter zmieniona sztucznie. Docelowo należy ustalić. #}
53           {% for tag in book.kinds %}
54             <li><a href="{{ tag.get_absolute_url }}">{{ tag|lower }}</a></li>
55           {% endfor %}
56           {% for tag in book.genres %}
57             <li><a href="{{ tag.get_absolute_url }}">{{ tag|lower }}</a></li>
58           {% endfor %}
59           {% for tag in book.epochs %}
60             <li><a href="{{ tag.get_absolute_url }}">{{ tag|lower }}</a></li>
61           {% endfor %}
62         </ul>
63       </div>
64       <div class="l-header__actions">
65         <button class="l-button l-button--fav">
66           <img src="{% static '2021/images/fav.svg' %}" alt="Dodaj do ulubionych">
67         </button>
68       </div>
69     </header>
70
71     <main class="l-main">
72       <section class="l-section">
73         <aside class="l-aside">
74           {% if book.parent or book.children.all %}
75             <h3>należy do zbiorów</h3>
76
77             {% if book.parent %}
78               <ul>
79               {% for b in book.ancestor.all %}
80                 <li>
81                   <a href="{{ b.get_absolute_url }}">{{ b.title }}</a>
82                   <ul>
83               {% endfor %}
84               {% for b in book.get_siblings %}
85                 <li>
86                   {% if b == book %}
87                     <strong>{{ b.title }}</strong>
88                     <ul>
89                       {% for c in book.children.all %}
90                         <li>
91                           <a href="{{ c.get_absolute_url }}">{{ c.title }}</a>
92                         </li>
93                       {% endfor %}
94                     </ul>
95                   {% else %}
96                     <a href="{{ b.get_absolute_url }}">{{ b.title }}</a>
97                   {% endif %}
98                 </li>
99               {% endfor %}
100
101               {% for b in book.ancestor.all %}
102                 </ul>
103                 </li>
104               {% endfor %}
105               </ul>
106
107             {% else %}
108               <ul>
109                 <li>
110                   <strong>{{ book.title }}</strong>
111                   <ul>
112                     {% for c in book.children.all %}
113                       <li>
114                         <a href="{{ c.get_absolute_url }}">{{ c.title }}</a>
115                       </li>
116                     {% endfor %}
117                   </ul>
118                 </li>
119               </ul>
120             {% endif %}
121
122
123           {% endif  %}
124
125
126           <ul class="c-externals">
127             <li><a href="{{ book.xml_file.url }}" target="_blank">źródłowy plik XML</a></li>
128             <li><a href="{% url 'poem_from_book' book.slug %}" target="_blank">miksuj treść utworu</a></li>
129
130             <li><a href="{{ book.get_extra_info_json.about }}" target="_blank">utwór na Platformie Redakcyjnej</a></li>
131           </ul>
132         </aside>
133         <article class="l-article">
134
135           <div class="quote l-article__lead">
136             {% choose_cite book as cite_promo %}
137             {% if cite_promo %}
138               {{ cite.promo_box }}
139             {% else %}
140               {% choose_fragment book as fragment_promo %}
141               {% if fragment_promo %}
142                 {{  fragment_promo.get_short_text|safe }}
143               {% endif %}
144             {% endif %}
145           </div>
146
147           <div class="c-media">
148             <div class="c-media__actions">
149               <div class="c-media__btn">
150                 <div class="l-button l-button--media">
151                   pobierz audiobook
152                 </div>
153                 <ul>
154                   <li>mp3</li>
155                   <li>ogg</li>
156                   <li>DAISY</li>
157                 </ul>
158               </div>
159               <div class="c-media__btn">
160                 <div class="l-button l-button--media">
161                   pobierz książkę
162                 </div>
163                 <ul>
164                   <li>PDF</li>
165                   <li>epub</li>
166                   <li>mobi</li>
167                 </ul>
168               </div>
169               <div class="c-media__btn">
170                 {#% if book.get_first_text %#}
171                   <a href="{#% url 'book_text' book.get_first_text.slug %#}">
172                     <div class="l-button l-button--media l-button--media--full">
173                       czytaj
174                     </div>
175                   </a>
176                   <!-- ul>
177                     <li>PDF</li>
178                     <li>epub</li>
179                     <li>mobi</li>
180                   </ul-->
181                 {#% endif %#}
182               </div>
183             </div>
184             <div class="c-media__player">
185               <h2>słuchaj audiobooka w naszym serwisie</h2>
186               <div class="c-player">
187                 <button class="c-player__btn">
188                   <img src="{% static '2021/images/play.svg' %}" alt="słuchaj audiobooka w naszym serwisie">
189                 </button>
190                 <div class="c-player__timeline">
191                   <span></span>
192                   <time class="c-player__length">1h 20m</time>
193                 </div>
194               </div>
195             </div>
196           </div>
197
198           {{ book.abstract|safe }}
199
200         </article>
201       </section>
202
203
204       <section class="l-section">
205         <div class="c-support">
206           <h2>Ta książka jest dostępna dla tysięcy dzieciaków dzięki darowiznom od osób takich jak Ty!</h2>
207           <a href="/towarzystwo/">DORZUĆ SIĘ!</a>
208         </div>
209       </section>
210
211
212       {% for author in book.authors %}
213         <section class="l-section">
214           <div class="l-author">
215             <article class="l-author__info">
216               <h3>
217                 <a href="{{ author.get_absolute_url }}">
218                   {{ author.name }}
219                 </a>
220               </h3>
221
222               {{ author.description|safe }}
223
224             </article>
225             {% if HAVE_AUTHOR_PHOTO %}
226               <figure class="l-author__photo">
227                 <img src="{% static '2021/images/author.jpg' %}" alt="Adam Mickiewicz">
228                 <figcaption>
229                   Wikipedia
230                 </figcaption>
231               </figure>
232             {% endif %}
233           </div>
234         </section>
235       {% endfor %}
236
237       {% with book.related_themes as themes %}
238         {% if themes %}
239           <section class="l-section">
240             <div class="l-themes__wrapper">
241               <h2>motywy występujące w tym utworze</h2>
242               <div class="l-themes">
243                 <ul>
244                   {% for item in themes %}
245                     <li><a href="{% url 'book_fragments' book.slug item.slug %}">{{ item|lower }}&nbsp;({{ item.count}})</a></li>
246                   {% endfor %}
247                 </ul>
248                 <a class="button" href="{% url 'theme_catalogue' %}">zobacz wszystkie motywy</a>
249               </div>
250             </div>
251           </section>
252         {% endif %}
253       {% endwith %}
254
255
256       <section class="l-section">
257         <div class="l-books__wrapper">
258           <h2>inne tytuły w naszej bibliotece</h2>
259           <div class="l-books">
260
261             {% if book.other_versions %}
262               {% for rel in book.other_versions %}
263
264                 <article class="l-books__item">
265                   <figure class="l-books__item__img">
266                     <a href="{{ rel.get_absolute_url }}">
267                       <img src="{% if rel.cover %}{{ rel.cover.url }}{% endif %}" alt="{{ rel.pretty_title }}">
268                     </a>
269                   </figure>
270                   <h3>
271                     {% for author in rel.authors %}
272                       <a href="{{ author.get_absolute_url }}">{{ author|upper }}</a>
273                     {% endfor %}
274                   </h3>
275                   <h2><a href="{{ rel.get_absolute_url }}">{{ rel.title }}</a></h2>
276                 </article>
277               {% endfor %}
278             {% endif %}
279
280             {% related_books_2021 book taken=book.other_versions|length as related_books %}
281             {% for rel in related_books %}
282               <article class="l-books__item">
283                 <figure class="l-books__item__img">
284                   <a href="{{ rel.get_absolute_url }}">
285                     <img src="{% if rel.cover %}{{ rel.cover.url }}{% endif %}" alt="{{ rel.pretty_title }}">
286                   </a>
287                 </figure>
288                 <h3>
289                   {% for author in rel.authors %}
290                     <a href="{{ author.get_absolute_url }}">{{ author|upper }}</a>
291                   {% endfor %}
292                 </h3>
293                 <h2><a href="{{ rel.get_absolute_url }}">{{ rel.title }}</a></h2>
294               </article>
295             {% endfor %}
296
297
298           </div>
299         </div>
300       </section>
301     </main>
302
303     <div class="l-footer">
304       <div class="l-footer__row">
305         <div class="l-footer__col">
306           <p>Wolne Lektury to projekt prowadzony przez fundację Nowoczesna Polska.</p>
307           <p>Reprodukcje cyfrowe wykonane przez Bibliotekę Narodową, Bibliotekę Śląską i Bibliotekę Elbląską z egzemplarzy pochodzących ze zbiorów BN, BŚ i BE.</p>
308           <p>Hosting: ICM.</p>
309         </div>
310         <div class="l-footer__col">
311           <ul>
312             <li>Fundacja Nowoczesna Polska</li>
313             <li>ul. Marszałkowska 84/92 lok. 125</li>
314             <li>00-514 Warszawa</li>
315           </ul>
316           <ul>
317             <li>tel: <a href="tel:+48226213017">(22) 621-30-17</a></li>
318             <li>e-mail: <a href="mailto:fundacja@nowoczesnapolska.org.pl">fundacja@nowoczesnapolska.org.pl</a></li>
319           </ul>
320         </div>
321       </div>
322       <div class="l-footer__row">
323         <p>
324           Nowa strona biblioteki Wolne Lektury powstała dzięki środkom otrzymanym w ramach Programu Operacyjnego Fundusz
325           Inicjatyw Obywatelskich, Senatu RP (zadanie realizowane w ramach zlecania przez Kancelarię Senatu zadań
326           w zakresie opieki nad Polonią i Polakami za granicą w 2011 r.) oraz Narodowego Instytutu Audiowizualnego
327           w ramach programu Dziedzictwo Cyfrowe.
328         </p>
329       </div>
330     </div>
331
332     <script src="{% static '2021/scripts/vendor.js' %}"></script>
333     <script src="{% static '2021/scripts/main.js' %}"></script>
334   </body>
335 </html>