Merge remote-tracking branch 'zawadzki/new-design'
[wolnelektury.git] / src / catalogue / templates / catalogue / 2021 / 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ę – w prawym dolnym rogu znajdziesz przycisk oceny.
32           Jeżeli wolisz klasyczny wygląd - wystarczy, że <a 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     {# TODO: BREADCRUMBS #}
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             <img src="{% if book.cover_thumb %}{{ book.cover_thumb.url }}{% endif %}" alt="{{ book.pretty_title }}" width="238">
76           </figure>
77           <ul class="l-aside__info">
78             <li><span>Epoka:</span> {% for tag in book.epochs %}<a href="{{ tag.get_absolute_url }}">{{ tag.name|lower }}</a> {% endfor %}</li>
79             <li><span>Rodzaj:</span> {% for tag in book.kinds %}<a href="{{ tag.get_absolute_url }}">{{ tag.name|lower }}</a> {% endfor %}</li>
80             <li><span>Gatunek:</span> {% for tag in book.genres %}<a href="{{ tag.get_absolute_url }}">{{ tag.name|lower }}</a> {% endfor %}</li>
81           </ul>
82           {% if book.parent or book.get_children %}
83             <ul class="l-aside__zbiory">
84               {% if book.parent %}
85                 {% for b in book.ancestors %}
86                   <li>
87                     <a href="{{ b.get_absolute_url }}">{{ b.title }}</a>
88                     <ul>
89                 {% endfor %}
90                 {% for b in book.get_siblings %}
91                   <li>
92                     {% if b == book %}
93                       <strong>{{ b.title }}</strong>
94                       <ul>
95                         {% for c in book.get_children %}
96                           <li>
97                             <a href="{{ c.get_absolute_url }}">{{ c.title }}</a>
98                           </li>
99                         {% endfor %}
100                       </ul>
101                     {% else %}
102                       <a href="{{ b.get_absolute_url }}">{{ b.title }}</a>
103                     {% endif %}
104                   </li>
105                 {% endfor %}
106
107                 {% for b in book.ancestor.all %}
108                     </ul>
109                   </li>
110                 {% endfor %}
111               {% else %}
112                 <li>
113                   <strong>{{ book.title }}</strong>
114                   <ul>
115                     {% for c in book.get_children %}
116                       <li>
117                         <a href="{{ c.get_absolute_url }}">{{ c.title }}</a>
118                       </li>
119                     {% endfor %}
120                   </ul>
121                 </li>
122               {% endif %}
123             </ul>
124           {% endif  %}
125         </aside>
126         <div class="l-content">
127           <header class="l-header">
128             <div class="l-header__content">
129               <p>{% for author in book.authors %}<a href="{{ author.get_absolute_url }}">{{ author.name }}</a>{% if not forloop.last %}, {% endif %}{% endfor %}
130                 {% if book.translators %}
131                   (tłum. {% for translator in book.translators %}{{ translator }}{% endfor %})
132                 {% endif %}
133               </p>
134               <h1>{{ book.title }}</h1>
135             </div>
136             <div class="l-header__actions">
137               <button class="l-button l-button--fav">
138                 <img src="{% static '2022/images/fav.svg' %}" alt="Dodaj do ulubionych">
139               </button>
140             </div>
141           </header>
142           <article class="l-article">
143             <div class="c-media">
144               <div class="c-media__actions">
145                 <div class="c-media__btn">
146                   {% if book.has_mp3_file %}
147                     <button class="l-button l-button--media" id="audiobook"><i class="icon icon-audio"></i> pobierz audiobook</button>
148                   {% endif %}
149                 </div>
150                 <div class="c-media__btn">
151                   <button class="l-button l-button--media" id="ebook"><i class="icon icon-book"></i> pobierz książkę</button>
152                 </div>
153                 <div class="c-media__btn">
154                   {% with t=book.get_first_text %}
155                     {% if t %}
156                       <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>
157                     {% endif %}
158                   {% endwith %}
159                 </div>
160               </div>
161
162
163
164               {% if book.has_mp3_file %}
165                 {% include 'catalogue/snippets/2022_jplayer.html' %}
166               {% endif %}
167
168
169
170
171               <div class="c-media__popup" data-popup="ebook">
172                 <div class="c-media__popup__box">
173                   <div class="c-media__popup__box__lead">
174                     <h2>Pobieranie e-booka</h2>
175                     <p>Wybierz wersję dla siebie:</p>
176                   </div>
177                   <div class="c-media__popup__box__items">
178                     {% if book.pdf_file %}
179                       <div class="c-media__popup__box__item">
180                         <div>
181                           <h3>.pdf</h3>
182                           <p>Jeśli planujesz wydruk albo lekturę na urządzeniu mobilnym bez dodatkowych aplikacji.</p>
183                         </div>
184                         <div>
185                           <a href="{{ book.pdf_url }}" class="l-button l-button--media l-button--media--full">.pdf</a>
186                         </div>
187                       </div>
188                     {% endif %}
189                     {% if book.epub_file %}
190                       <div class="c-media__popup__box__item">
191                         <div>
192                           <h3>.epub</h3>
193                           <p>Uniwersalny format e-booków, obsługiwany przez większość czytników sprzętowych i aplikacji na urządzenia mobilne.</p>
194                         </div>
195                         <div>
196                           <a href="{{ book.epub_url }}" class="l-button l-button--media l-button--media--full">.epub</a>
197                         </div>
198                       </div>
199                     {% endif %}
200                     {% if book.mobi_file %}
201                       <div class="c-media__popup__box__item">
202                         <div>
203                           <h3>.mobi</h3>
204                           <p>Natywny format dla czytnika Amazon Kindle.</p>
205                         </div>
206                         <div>
207                           <a href="{{ book.mobi_url }}" class="l-button l-button--media l-button--media--full">.mobi</a>
208                         </div>
209                       </div>
210                     {% endif %}
211                     {% if book.synchro_file %}
212                       <div class="c-media__popup__box__item">
213                         <div>
214                           <h3>synchrobook (epub3)</h3>
215                           <p>Książka elektroniczna i audiobook w jednym. Wymaga aplikacji obsługującej format (np. ..., ..., ...).</p>
216                         </div>
217                         <div>
218                           <a href="#" class="l-button l-button--media l-button--media--full">synchrobook</a>
219                         </div>
220                       </div>
221                     {% endif %}
222                     {% if book.txt_file or book.fb2_file %}
223                       <div class="c-media__popup__box__item">
224                         <div>
225                           <h3>inne formaty</h3>
226                           <ul>
227                             {% if book.txt_file %}<li><a href="{{ book.txt_url }}">plik tekstowy (.txt)</a></li>{% endif %}
228                             {% if book.fb2_file %}<li><a href="{{ book.fb2_url }}">FictionBook</a></li>{% endif %}
229                           </ul>
230                         </div>
231                       </div>
232                     {% endif %}
233                   </div>
234                   <button class="c-media__popup__close">
235                     <img src="{% static '2022/images/close.svg' %}" alt="Zamknij">
236                   </button>
237                 </div>
238               </div>
239               {% if book.has_mp3_file %}
240                 <div class="c-media__popup" data-popup="audiobook">
241                   <div class="c-media__popup__box">
242                     <div class="c-media__popup__box__lead">
243                       <h2>Pobieranie audiobooka</h2>
244                       <p>Wybierz wersję dla siebie:</p>
245                     </div>
246                     <div class="c-media__popup__box__items">
247                       <div class="c-media__popup__box__item">
248                         <div>
249                           <h3>.mp3</h3>
250                           <p>Uniwersalny format, obsługiwany przez wszystkie urządzenia.</p>
251                         </div>
252                         <div>
253                           <a href="{% url 'download_zip_mp3' book.slug %}" class="l-button l-button--media l-button--media--full">.mp3</a>
254                         </div>
255                       </div>
256                       {% if book.has_ogg_file %}
257                         <div class="c-media__popup__box__item">
258                           <div>
259                             <h3>OggVorbis</h3>
260                             <p>Otwarty format plików audio, oferujący nagranie w najwyższej jakości dźwiękowej.</p>
261                           </div>
262                           <div>
263                             <a href="{% url 'download_zip_ogg' book.slug %}" class="l-button l-button--media l-button--media--full">.ogg</a>
264                           </div>
265                         </div>
266                       {% endif %}
267                       {% if book.has_daisy_file %}
268                         <div class="c-media__popup__box__item">
269                           <div>
270                             <h3>DAISY</h3>
271                             <p>Format dla osób z dysfunkcjami czytania.</p>
272                           </div>
273                           <div>
274                             {% for dsy in book.media_daisy %}
275                               <a href="{{ dsy.file.url }}" class="l-button l-button--media l-button--media--full">DAISY</a>
276                             {% endfor %}
277                           </div>
278                         </div>
279                       {% endif %}
280                       {% if book.has_synchro_file %}
281                         <div class="c-media__popup__box__item">
282                           <div>
283                             <h3>synchrobook</h3>
284                             <p>Książka elektroniczna i audiobook w jednym. Wymaga aplikacji obsługującej format.</p>
285                           </div>
286                           <div>
287                             <a href="#" class="l-button l-button--media l-button--media--full">synchrobook</a>
288                           </div>
289                         </div>
290                       {% endif %}
291                     </div>
292                     <button class="c-media__popup__close">
293                       <img src="{% static '2022/images/close.svg' %}" alt="Zamknij">
294                     </button>
295                   </div>
296                 </div>
297               {% endif %}
298             </div>
299
300             <div class="l-article__overlay" data-max-height="327">
301               <h3>Opis</h3>
302               {{ book.abstract|safe }}
303
304               <h4>Spis treści:</h4>
305               <ul>
306                 <li>Dziady. Poema</li>
307                 <li>Przedmowa</li>
308                 <li>Upiór</li>
309                 <li>Dziady, część II</li>
310                 <li>Dziady, część IV</li>
311                 <li>Dziady, część III</li>
312                 <li>Dziady. Widowisko, część I</li>
313               </ul>
314             </div>
315             <button class="l-article__read-more" aria-label="Kliknij aby rozwinąć" data-label="Czytaj więcej" data-action="Zwiń tekst">Czytaj więcej</button>
316           </article>
317         </div>
318       </section>
319       <section class="l-section">
320         <div class="c-support">
321           <h2>Ta książka jest dostępna dla tysięcy dzieciaków dzięki darowiznom od osób takich jak Ty!</h2>
322           <figure>
323             <img src="{% static '2022/images/img-1.jpg' %}" alt="Dorzuć się!">
324             <a href="/towarzystwo/">Dorzuć się!</a>
325           </figure>
326         </div>
327       </section>
328
329       {% for author in book.authors %}
330         <section class="l-section">
331           <div class="l-author">
332             <div class="row">
333               <h2>O autorze</h2>
334               <div>
335                 {% if author.photo %}
336                   <figure class="l-author__photo">
337                     <img src="{{ author.photo.url }}" alt="{{ author.name }}" style="width: 238px;">
338                     <figcaption>
339                       {{ author.photo_attribution|safe }}
340                     </figcaption>
341                   </figure>
342                 {% endif %}
343                 <article class="l-author__info">
344                   <h3>{{ author.name }}</h3>
345                   <div class="l-article__overlay" data-max-height="327">
346                     {{ author.description|safe }}
347                   </div>
348                   <button class="l-article__read-more" aria-label="Kliknij aby rozwinąć" data-label="Czytaj więcej" data-action="Zwiń tekst">Czytaj więcej</button>
349                 </article>
350               </div>
351             </div>
352
353             <div class="row">
354               <div class="l-author__quotes">
355                 <div class="l-author__quotes__slider">
356                   {% choose_cites book 3 as cites %}
357                   {% for fragment in cites %}
358                     <div class="l-author__quotes__slider__item">
359                       <em>
360                         {{ fragment.short_text|safe }}
361                       </em>
362                       <p>{{ fragment.book.pretty_title }}</p>
363                     </div>
364                   {% endfor %}
365                 </div>
366               </div>
367             </div>
368           </div>
369       </section>
370       {% endfor %}
371
372       <section class="l-section">
373         <div class="l-themes__wrapper">
374           {% with book.related_themes as themes %}
375             {% if themes %}
376               <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>
377               <div class="l-themes">
378                 <ul>
379                   {% for item in themes %}
380                     <li><a href="{% url 'book_fragments' book.slug item.slug %}">{{ item|lower }}&nbsp;({{ item.count}})</a></li>
381                   {% endfor %}
382                 </ul>
383               </div>
384             {% endif %}
385           {% endwith %}
386           <ul class="links">
387             <li>
388               <a href="{{ book.xml_url }}">źródłowy plik XML</a>
389             </li>
390             <li>
391               <a target="_blank" href="{% url 'poem_from_book' book.slug %}">miksuj treść utworu</a>
392             </li>
393             <li>
394               <a target="_blank" href="{{ book.get_extra_info_json.about }}">utwór na Platformie Redakcyjnej</a>
395             </li>
396           </ul>
397         </div>
398       </section>
399     </main>
400
401
402
403
404
405     <section class="l-section">
406       <div class="l-books__wrapper">
407         <div class="l-container">
408           <h2>Tytuły powiązane</h2>
409           <div class="l-books">
410             {% if book.other_versions %}
411               {% for rel in book.other_versions %}
412                 <article class="l-books__item">
413                   <figure class="l-books__item__img">
414                     <a href="{{ rel.get_absolute_url }}">
415                       <img src="{% if rel.cover %}{{ rel.cover.url }}{% endif %}" alt="{{ rel.pretty_title }}">
416                     </a>
417                   </figure>
418                   <h3>
419                     {% for author in rel.authors %}
420                       <a href="{{ author.get_absolute_url }}">{{ author }}</a>
421                     {% endfor %}
422                   </h3>
423                   <h2><a href="{{ rel.get_absolute_url }}">{{ rel.title }}</a></h2>
424                 </article>
425               {% endfor %}
426             {% endif %}
427
428
429             {% related_books_2021 book taken=book.other_versions|length as related_books %}
430             {% for rel in related_books %}
431               <article class="l-books__item">
432                 <figure class="l-books__item__img">
433                   <a href="{{ rel.get_absolute_url }}">
434                     <img src="{% if rel.cover %}{{ rel.cover.url }}{% endif %}" alt="{{ rel.pretty_title }}">
435                   </a>
436                 </figure>
437                 <h3>
438                   {% for author in rel.authors %}
439                     <a href="{{ author.get_absolute_url }}">{{ author|upper }}</a>
440                   {% endfor %}
441                 </h3>
442                 <h2><a href="{{ rel.get_absolute_url }}">{{ rel.title }}</a></h2>
443               </article>
444             {% endfor %}
445
446             <article class="l-books__item l-books__item--link">
447               <a href="/katalog/kolekcje/">i wiele innych książek, wierszy, obrazów, audiobooków…</a>
448               <a href="/katalog/kolekcje/" class="icon-link"><i class="icon icon-all"></i></a>
449             </article>
450
451           </div>
452         </div>
453       </div>
454     </section>
455
456     <div class="l-footer">
457       <div class="l-container">
458         <div class="l-footer__row">
459           <a href="#"><img src="{% static '2022/images/FNP-logo.png' %}" alt="FUNDACJA Nowoczesna Polska"></a>
460           <ul>
461             <li>ul. Marszałkowska 84/92 lok. 125</li>
462             <li>00-514 Warszawa</li>
463           </ul>
464           <ul class="teal">
465             <li>tel. <a href="#">(22) 621 30 17</a></li>
466             <li>email <a href="#">fundacja@nowoczesnapolska.org.pl</a></li>
467           </ul>
468         </div>
469         <div class="l-footer__row">
470           <div>
471             Wolne Lektury to projekt prowadzony przez fundację <a href="#">Nowoczesna Polska</a>. <br>
472             Hosting: <a href="#">ICM</a>.
473           </div>
474           <div>
475             <a href="#"><img src="{% static '2022/images/MKiDN.png' %}" alt="MKiDN"></a>
476           </div>
477           <div>
478             Strona biblioteki Wolne Lektury powstała dzięki dofinansowaniu ze środków Ministra <a href="#">Kultury i Dziedzictwa Narodowego</a>
479             pochodzących z <a href="#">Funduszu Promocji Kultury</a> – państwowego funduszu celowego.
480           </div>
481         </div>
482       </div>
483     </div>
484
485     <script src="{% static '2022/scripts/vendor.js' %}"></script>
486     <script src="{% static '2022/scripts/main.js' %}"></script>
487
488     {% javascript '2022' %}
489     {% javascript '2022_player' %}
490   </body>
491 </html>