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