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