a265abef8b751323d0278c7e2c783b4b7c390f4b
[wolnelektury.git] / src / catalogue / templates / catalogue / 2022 / book_detail.html
1 <!doctype html>
2 {% load pipeline %}
3 {% load static %}
4 {% load choose_cites 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 '2022' %}
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=Source+Sans+Pro:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400&display=swap" rel="stylesheet">
23   </head>
24   <body>
25
26     <nav class="l-navigation">
27       <div class="l-change-pop">
28         <h3>Zmieniamy się!</h3>
29         <p>
30           Jeżeli to czytasz jesteś jedną z osób, której prezentujemy nowy wygląd strony książki.
31           Będziemy bardzo! wdzięczni za Twoją opinię – <a href='{% url 'suggest' %}' target="_blank">możesz nam ją przesłać tutaj</a>.
32           Jeżeli wolisz klasyczny wygląd - wystarczy, że <a class="quit-experiment" href="#">klikniesz tutaj</a>
33         </p>
34         <!-- button class="l-change-pop__close">
35           <i class="icon icon-close"></i>
36         </button -->
37       </div>
38       <div class="l-container">
39         <a href="/" class="l-navigation__logo">
40           <img src="{% static "2022/images/logo.png" %}" alt="WolneLektury.pl">
41         </a>
42         <div class="l-naviagion__search">
43           <form action="/szukaj/">
44             <input id="search" name="q" type="text" placeholder="szukaj tytułu, autora, motywów…" autocomplete="off" data-source="/szukaj/hint/?max=10">
45           </form>
46         </div>
47         <div class="l-navigation__actions">
48           <a href="/ludzie/polka/"><i class="icon icon-liked"></i></a>
49           <!-- button class="l-navigation__button js-menu" aria-label="Menu">
50             <span class="c-hamburger">
51               <span class="bar"></span>
52             </span>
53           </button-->
54         </div>
55       </div>
56     </nav>
57
58
59     <div class="l-container">
60       <div class="l-breadcrumb">
61         <a href="/"><span>Strona główna</span></a>
62         <a href="/katalog/lektury/"><span>Literatura</span></a>
63         {% for ancestor in book.ancestors %}
64           <a href="{{ ancestor.get_absolute_url }}">{{ ancestor.title }}</a>
65         {% endfor %}
66       </div>
67     </div>
68
69
70     <main class="l-main">
71       <section class="l-section">
72         <aside class="l-aside">
73           <figure>
74             <a href="{% url 'book_text' book.slug %}">
75               <img src="{% if book.cover_clean %}{{ book.cover_clean.url }}{% endif %}" alt="{{ book.pretty_title }}" width="240">
76             </a>
77           </figure>
78           <ul class="l-aside__info">
79             <li><span>Epoka:</span> {% for tag in book.epochs %}<a href="{{ tag.get_absolute_url }}">{{ tag.name }}</a> {% endfor %}</li>
80             <li><span>Rodzaj:</span> {% for tag in book.kinds %}<a href="{{ tag.get_absolute_url }}">{{ tag.name }}</a> {% endfor %}</li>
81             <li><span>Gatunek:</span> {% for tag in book.genres %}<a href="{{ tag.get_absolute_url }}">{{ tag.name }}</a> {% endfor %}</li>
82           </ul>
83           {% if book.parent or book.get_children %}
84             <ul class="l-aside__zbiory">
85               {% if book.parent %}
86                 {% for b in book.ancestors %}
87                   <li>
88                     <a href="{{ b.get_absolute_url }}">{{ b.title }}</a>
89                     <ul>
90                 {% endfor %}
91                 {% for b in book.get_siblings %}
92                   <li>
93                     {% if b == book %}
94                       <strong>{{ b.title }}</strong>
95                       <ul>
96                         {% for c in book.get_children %}
97                           <li>
98                             <a href="{{ c.get_absolute_url }}">{{ c.title }}</a>
99                           </li>
100                         {% endfor %}
101                       </ul>
102                     {% else %}
103                       <a href="{{ b.get_absolute_url }}">{{ b.title }}</a>
104                     {% endif %}
105                   </li>
106                 {% endfor %}
107
108                 {% for b in book.ancestor.all %}
109                     </ul>
110                   </li>
111                 {% endfor %}
112               {% else %}
113                 <li>
114                   <strong>{{ book.title }}</strong>
115                   <ul>
116                     {% for c in book.get_children %}
117                       <li>
118                         <a href="{{ c.get_absolute_url }}">{{ c.title }}</a>
119                       </li>
120                     {% endfor %}
121                   </ul>
122                 </li>
123               {% endif %}
124             </ul>
125           {% endif  %}
126         </aside>
127         <div class="l-content">
128           <header class="l-header">
129             <div class="l-header__content">
130               <p>{% for author in book.authors %}<a href="{{ author.get_absolute_url }}">{{ author.name }}</a>{% if not forloop.last %}, {% endif %}{% endfor %}
131                 {% if book.translators %}
132                   (tłum. {% for translator in book.translators %}{{ translator }}{% endfor %})
133                 {% endif %}
134               </p>
135               <h1><a href="{{ book.get_absolute_url }}">{{ book.title }}</a></h1>
136             </div>
137             <div class="l-header__actions">
138               <form method='post' action='{% url 'social_like_book' book.slug %}'>
139                 {% csrf_token %}
140                 <button class="l-button l-button--fav">
141                   <img src="{% static '2022/images/fav.svg' %}" alt="Dodaj do ulubionych">
142                 </button>
143               </form>
144             </div>
145           </header>
146           <article class="l-article">
147             <div class="c-media">
148               <div class="c-media__actions">
149                 <div class="c-media__btn">
150                   {% if book.has_mp3_file %}
151                     <button class="l-button l-button--media" id="audiobook"><i class="icon icon-audio"></i> pobierz audiobook</button>
152                   {% endif %}
153                 </div>
154                 <div class="c-media__btn">
155                   <button class="l-button l-button--media" id="ebook"><i class="icon icon-book"></i> pobierz książkę</button>
156                 </div>
157                 <div class="c-media__btn">
158                   {% with t=book.get_first_text %}
159                     {% if t %}
160                       <a href="{% url 'book_text' t.slug %}" class="l-button l-button--media l-button--media--full"><i class="icon icon-eye"></i> czytaj online</a>
161                     {% endif %}
162                   {% endwith %}
163                 </div>
164               </div>
165
166
167
168               {% if book.has_mp3_file %}
169                 {% include 'catalogue/snippets/2022_jplayer.html' %}
170               {% else %}
171                 {% with ch=book.get_child_audiobook %}
172                   {% if ch %}
173                     {% include 'catalogue/snippets/2022_jplayer_link.html' with book=ch %}
174                   {% endif %}
175                 {% endwith %}
176
177               {% endif %}
178
179
180
181
182               <div class="c-media__popup" data-popup="ebook">
183                 <div class="c-media__popup__box">
184                   <div class="c-media__popup__box__lead">
185                     <h2>Pobieranie e-booka</h2>
186                     <p>Wybierz wersję dla siebie:</p>
187                   </div>
188                   <div class="c-media__popup__box__items">
189                     {% if book.pdf_file %}
190                       <div class="c-media__popup__box__item">
191                         <div>
192                           <h3>.pdf</h3>
193                           <p>Jeśli planujesz wydruk albo lekturę na urządzeniu mobilnym bez dodatkowych aplikacji.</p>
194                         </div>
195                         <div>
196                           <a href="{{ book.pdf_url }}" class="l-button l-button--media l-button--media--full">.pdf</a>
197                         </div>
198                       </div>
199                     {% endif %}
200                     {% if book.epub_file %}
201                       <div class="c-media__popup__box__item">
202                         <div>
203                           <h3>.epub</h3>
204                           <p>Uniwersalny format e-booków, obsługiwany przez większość czytników sprzętowych i aplikacji na urządzenia mobilne.</p>
205                         </div>
206                         <div>
207                           <a href="{{ book.epub_url }}" class="l-button l-button--media l-button--media--full">.epub</a>
208                         </div>
209                       </div>
210                     {% endif %}
211                     {% if book.mobi_file %}
212                       <div class="c-media__popup__box__item">
213                         <div>
214                           <h3>.mobi</h3>
215                           <p>Natywny format dla czytnika Amazon Kindle.</p>
216                         </div>
217                         <div>
218                           <a href="{{ book.mobi_url }}" class="l-button l-button--media l-button--media--full">.mobi</a>
219                         </div>
220                       </div>
221                     {% endif %}
222                     {% if book.synchro_file %}
223                       <div class="c-media__popup__box__item">
224                         <div>
225                           <h3>synchrobook (epub3)</h3>
226                           <p>Książka elektroniczna i audiobook w jednym. Wymaga aplikacji obsługującej format (np. ..., ..., ...).</p>
227                         </div>
228                         <div>
229                           <a href="#" class="l-button l-button--media l-button--media--full">synchrobook</a>
230                         </div>
231                       </div>
232                     {% endif %}
233                     {% if book.txt_file or book.fb2_file %}
234                       <div class="c-media__popup__box__item">
235                         <div>
236                           <h3>inne formaty</h3>
237                           <ul>
238                             {% if book.txt_file %}<li><a href="{{ book.txt_url }}">plik tekstowy (.txt)</a></li>{% endif %}
239                             {% if book.fb2_file %}<li><a href="{{ book.fb2_url }}">FictionBook</a></li>{% endif %}
240                           </ul>
241                         </div>
242                       </div>
243                     {% endif %}
244                   </div>
245                   <button class="c-media__popup__close">
246                     <img src="{% static '2022/images/close.svg' %}" alt="Zamknij">
247                   </button>
248                 </div>
249               </div>
250               {% if book.has_mp3_file %}
251                 <div class="c-media__popup" data-popup="audiobook">
252                   <div class="c-media__popup__box">
253                     <div class="c-media__popup__box__lead">
254                       <h2>Pobieranie audiobooka</h2>
255                       <p>Wybierz wersję dla siebie:</p>
256                     </div>
257                     <div class="c-media__popup__box__items">
258                       <div class="c-media__popup__box__item">
259                         <div>
260                           <h3>.mp3</h3>
261                           <p>Uniwersalny format, obsługiwany przez wszystkie urządzenia.</p>
262                         </div>
263                         <div>
264                           <a href="{% url 'download_zip_mp3' book.slug %}" class="l-button l-button--media l-button--media--full">.mp3</a>
265                         </div>
266                       </div>
267                       {% if book.has_ogg_file %}
268                         <div class="c-media__popup__box__item">
269                           <div>
270                             <h3>OggVorbis</h3>
271                             <p>Otwarty format plików audio, oferujący nagranie w najwyższej jakości dźwiękowej.</p>
272                           </div>
273                           <div>
274                             <a href="{% url 'download_zip_ogg' book.slug %}" class="l-button l-button--media l-button--media--full">.ogg</a>
275                           </div>
276                         </div>
277                       {% endif %}
278                       {% if book.has_daisy_file %}
279                         <div class="c-media__popup__box__item">
280                           <div>
281                             <h3>DAISY</h3>
282                             <p>Format dla osób z dysfunkcjami czytania.</p>
283                           </div>
284                           <div>
285                             {% for dsy in book.media_daisy %}
286                               <a href="{{ dsy.file.url }}" class="l-button l-button--media l-button--media--full">DAISY</a>
287                             {% endfor %}
288                           </div>
289                         </div>
290                       {% endif %}
291                       {% if book.has_synchro_file %}
292                         <div class="c-media__popup__box__item">
293                           <div>
294                             <h3>synchrobook</h3>
295                             <p>Książka elektroniczna i audiobook w jednym. Wymaga aplikacji obsługującej format.</p>
296                           </div>
297                           <div>
298                             <a href="#" class="l-button l-button--media l-button--media--full">synchrobook</a>
299                           </div>
300                         </div>
301                       {% endif %}
302                     </div>
303                     <button class="c-media__popup__close">
304                       <img src="{% static '2022/images/close.svg' %}" alt="Zamknij">
305                     </button>
306                   </div>
307                 </div>
308               {% endif %}
309             </div>
310
311             <div class="l-article__overlay" data-max-height="327">
312               {{ book.abstract|safe }}
313
314               {% if book.toc %}
315                 <h4>Spis treści:</h4>
316                 {{ book.toc|safe }}
317               {% endif %}
318             </div>
319             <button class="l-article__read-more" aria-label="Kliknij aby rozwinąć" data-label="Czytaj więcej" data-action="Zwiń tekst">Czytaj więcej</button>
320           </article>
321           <div class="c-support">
322             <div>
323               <h2>Ta książka jest dostępna dla tysięcy dzieciaków dzięki <span>darowiznom</span> od osób takich jak <span>Ty</span>!</h2>
324               <a href="/towarzystwo/">Dorzuć się!</a>
325             </div>
326             <figure>
327               <img src="{% static '2022/images/dziecko.jpeg' %}" alt="Dorzuć się!">
328             </figure>
329           </div>
330         </div>
331       </section>
332
333       {% for author in book.authors %}
334         <section class="l-section">
335           <div class="l-author">
336             <div class="row">
337               <h2>O autorze</h2>
338               <div>
339                 {% if author.photo %}
340                   <figure class="l-author__photo">
341                     <img src="{{ author.photo.url }}" alt="{{ author.name }}" style="width: 238px;">
342                     <figcaption>
343                       {{ author.photo_attribution|safe }}
344                     </figcaption>
345                   </figure>
346                 {% endif %}
347                 <article class="l-author__info">
348                   <h3>{{ author.name }}</h3>
349                   <div class="l-article__overlay" data-max-height="327">
350                     {{ author.description|safe }}
351                   </div>
352                   <button class="l-article__read-more" aria-label="Kliknij aby rozwinąć" data-label="Czytaj więcej" data-action="Zwiń tekst">Czytaj więcej</button>
353                 </article>
354               </div>
355             </div>
356
357             {% choose_cites book 3 as cites %}
358             {% if cites %}
359               <div class="row">
360                 <div class="l-author__quotes">
361                   <div class="l-author__quotes__slider">
362                     {% for fragment in cites %}
363                       <a class="l-author__quotes__slider__item" href="{{ fragment.get_absolute_url }}">
364
365                         <em>
366                           {{ fragment.short_text|safe }}
367                         </em>
368                         <p>{{ fragment.book.pretty_title }}</p>
369                       </a>
370                     {% endfor %}
371                   </div>
372                 </div>
373               </div>
374             {% endif %}
375           </div>
376       </section>
377       {% endfor %}
378
379       <section class="l-section">
380         <div class="l-themes__wrapper">
381           {% with book.related_themes as themes %}
382             {% if themes %}
383               <h2>Motywy występujące w tym utworze <a href="/katalog/motyw/"><span>Wszystkie motywy</span> <i class="icon icon-arrow-right"></i></a></h2>
384               <div class="l-themes l-article__overlay" data-max-height="80">
385                 <ul>
386                   {% for item in themes %}
387                     <li><a href="{% url 'book_fragments' book.slug item.slug %}">{{ item }}&nbsp;({{ item.count}})</a></li>
388                   {% endfor %}
389                 </ul>
390               </div>
391               <button class="l-article__read-more" aria-label="Kliknij aby rozwinąć" data-label="Czytaj więcej" data-action="Zwiń tekst">Zobacz więcej</button>
392
393             {% endif %}
394           {% endwith %}
395           <ul class="links">
396             <li>
397               <a href="{{ book.xml_url }}">źródłowy plik XML</a>
398             </li>
399             <li>
400               <a target="_blank" href="{% url 'poem_from_book' book.slug %}">miksuj treść utworu</a>
401             </li>
402             <li>
403               <a target="_blank" href="{{ book.get_extra_info_json.about }}">utwór na Platformie Redakcyjnej</a>
404             </li>
405           </ul>
406         </div>
407       </section>
408     </main>
409
410
411
412
413
414     <section class="l-section">
415       <div class="l-books__wrapper">
416         <div class="l-container">
417           <h2>Czytaj także</h2>
418           <div class="l-books">
419             {% if book.other_versions %}
420               {% for rel in book.other_versions %}
421                 <article class="l-books__item">
422                   <figure class="l-books__item__img">
423                     <a href="{{ rel.get_absolute_url }}">
424                       <img src="{% if rel.cover %}{{ rel.cover.url }}{% endif %}" alt="{{ rel.pretty_title }}">
425                     </a>
426                   </figure>
427                   <h3>
428                     {% for author in rel.authors %}
429                       <a href="{{ author.get_absolute_url }}">{{ author }}</a>
430                     {% endfor %}
431                   </h3>
432                   <h2><a href="{{ rel.get_absolute_url }}">{{ rel.title }}</a></h2>
433                 </article>
434               {% endfor %}
435             {% endif %}
436
437
438             {% related_books_2022 book taken=book.other_versions|length as related_books %}
439             {% for rel in related_books %}
440               <article class="l-books__item">
441                 <figure class="l-books__item__img">
442                   <a href="{{ rel.get_absolute_url }}">
443                     <img src="{% if rel.cover %}{{ rel.cover.url }}{% endif %}" alt="{{ rel.pretty_title }}">
444                   </a>
445                 </figure>
446                 <h3>
447                   {% for author in rel.authors %}
448                     <a href="{{ author.get_absolute_url }}">{{ author|upper }}</a>
449                   {% endfor %}
450                 </h3>
451                 <h2><a href="{{ rel.get_absolute_url }}">{{ rel.title }}</a></h2>
452               </article>
453             {% endfor %}
454
455             <article class="l-books__item l-books__item--link">
456               <a href="/katalog/kolekcje/">i wiele innych książek, wierszy, obrazów, audiobooków…</a>
457               <a href="/katalog/kolekcje/" class="icon-link"><i class="icon icon-all"></i></a>
458             </article>
459
460           </div>
461         </div>
462       </div>
463     </section>
464
465     <div class="l-footer">
466       <div class="l-container">
467         <div class="l-footer__row">
468           <a href="#"><img src="{% static '2022/images/FNP-logo.png' %}" alt="FUNDACJA Nowoczesna Polska"></a>
469           <ul>
470             <li>ul. Marszałkowska 84/92 lok. 125</li>
471             <li>00-514 Warszawa</li>
472           </ul>
473           <ul class="teal">
474             <li>tel. <a href="#">(22) 621 30 17</a></li>
475             <li>email <a href="#">fundacja@nowoczesnapolska.org.pl</a></li>
476           </ul>
477         </div>
478         <div class="l-footer__row">
479           <div>
480             Wolne Lektury to projekt prowadzony przez fundację <a href="#">Nowoczesna Polska</a>. <br>
481             Hosting: <a href="#">ICM</a>.
482           </div>
483           <div>
484             <a href="#"><img src="{% static '2022/images/MKiDN.png' %}" alt="MKiDN"></a>
485           </div>
486           <div>
487             Strona biblioteki Wolne Lektury powstała dzięki dofinansowaniu ze środków Ministra <a href="#">Kultury i Dziedzictwa Narodowego</a>
488             pochodzących z <a href="#">Funduszu Promocji Kultury</a> – państwowego funduszu celowego.
489           </div>
490         </div>
491       </div>
492     </div>
493
494     <script src="{% static '2022/scripts/vendor.js' %}"></script>
495     <script src="{% static '2021/scripts/main.js' %}"></script>
496
497     {% javascript '2022' %}
498     {% javascript '2022_player' %}
499   </body>
500 </html>