Connect date in 2021 template.
[wolnelektury.git] / src / catalogue / templates / catalogue / 2021 / book_detail.html
1 <!doctype html>
2 {% load pipeline %}
3 {% load static %}
4 {% load choose_cite from social_tags %}
5 {% load choose_fragment license_icon from catalogue_tags %}
6 {% load catalogue_tags %}
7
8
9 <html class="no-js">
10   <head>
11     <meta charset="utf-8">
12     <meta name="description" content="">
13     <meta name="viewport" content="width=device-width,initial-scale=1">
14     <title>WolneLektury.pl</title>
15     <link rel="apple-touch-icon" href="apple-touch-icon.png">
16
17     {% stylesheet '2021' %}
18     <script src="scripts/modernizr.js"></script>
19
20     <link rel="preconnect" href="https://fonts.googleapis.com">
21     <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
22     <link href="https://fonts.googleapis.com/css2?family=Merriweather:wght@300&family=Roboto:wght@400;700&display=swap" rel="stylesheet">
23   </head>
24   <body>
25
26     <nav class="l-navigation">
27       <a href="/" class="l-navigation__logo">
28         <img src="{% static '2021/images/logo.png' %}" alt="WolneLektury.pl">
29       </a>
30       <button class="l-navigation__button js-menu" aria-label="Menu">
31         <span class="c-hamburger">
32             <span class="bar"></span>
33         </span>
34       </button>
35     </nav>
36
37     <header class="l-header">
38       <figure class="l-header__img">
39         <img src="{% if book.cover_thumb %}{{ book.cover_thumb.url }}{% endif %}" alt="{{ book.pretty_title }}">
40       </figure>
41       <div class="l-header__content">
42         <p>
43           {% for author in book.authors %}
44             <a href="{{ author.get_absolute_url  }}">{{ author }}</a>{% if not forloop.last %}, {% endif %}
45           {% endfor %}
46           {% if book.translators %}
47             (tłum. {% for translator in book.translators %}{{ translator }}{% endfor %})
48           {% endif %}
49         </p>
50         <h1>{{ book.title }}</h1>
51         <ul>
52           {# Wielkość liter zmieniona sztucznie. Docelowo należy ustalić. #}
53           {% for tag in book.kinds %}
54             <li><a href="{{ tag.get_absolute_url }}">{{ tag|lower }}</a></li>
55           {% endfor %}
56           {% for tag in book.genres %}
57             <li><a href="{{ tag.get_absolute_url }}">{{ tag|lower }}</a></li>
58           {% endfor %}
59           {% for tag in book.epochs %}
60             <li><a href="{{ tag.get_absolute_url }}">{{ tag|lower }}</a></li>
61           {% endfor %}
62         </ul>
63       </div>
64       <div class="l-header__actions">
65         <button class="l-button l-button--fav">
66           <img src="{% static '2021/images/fav.svg' %}" alt="Dodaj do ulubionych">
67         </button>
68       </div>
69     </header>
70
71     <main class="l-main">
72       <section class="l-section">
73         <aside class="l-aside">
74           {% if book.parent or book.children.all %}
75             <h3>należy do zbiorów</h3>
76
77             {% if book.parent %}
78               <ul>
79               {% for b in book.ancestor.all %}
80                 <li>
81                   <a href="{{ b.get_absolute_url }}">{{ b.title }}</a>
82                   <ul>
83               {% endfor %}
84               {% for b in book.get_siblings %}
85                 <li>
86                   {% if b == book %}
87                     <strong>{{ b.title }}</strong>
88                     <ul>
89                       {% for c in book.children.all %}
90                         <li>
91                           <a href="{{ c.get_absolute_url }}">{{ c.title }}</a>
92                         </li>
93                       {% endfor %}
94                     </ul>
95                   {% else %}
96                     <a href="{{ b.get_absolute_url }}">{{ b.title }}</a>
97                   {% endif %}
98                 </li>
99               {% endfor %}
100
101               {% for b in book.ancestor.all %}
102                 </ul>
103                 </li>
104               {% endfor %}
105               </ul>
106
107             {% else %}
108               <ul>
109                 <li>
110                   <strong>{{ book.title }}</strong>
111                   <ul>
112                     {% for c in book.children.all %}
113                       <li>
114                         <a href="{{ c.get_absolute_url }}">{{ c.title }}</a>
115                       </li>
116                     {% endfor %}
117                   </ul>
118                 </li>
119               </ul>
120             {% endif %}
121
122
123           {% endif  %}
124
125
126           <ul class="c-externals">
127             <li><a href="{{ book.xml_file.url }}" target="_blank">źródłowy plik XML</a></li>
128             <li><a href="{% url 'poem_from_book' book.slug %}" target="_blank">miksuj treść utworu</a></li>
129
130             <li><a href="{{ book.get_extra_info_json.about }}" target="_blank">utwór na Platformie Redakcyjnej</a></li>
131           </ul>
132         </aside>
133         <article class="l-article">
134
135           <div class="quote l-article__lead">
136             {% choose_cite book as cite_promo %}
137             {% if cite_promo %}
138               {{ cite.promo_box }}
139             {% else %}
140               {% choose_fragment book as fragment_promo %}
141               {% if fragment_promo %}
142                 {{  fragment_promo.get_short_text|safe }}
143               {% endif %}
144             {% endif %}
145           </div>
146
147           <div class="c-media">
148             <div class="c-media__actions">
149               <div class="c-media__btn">
150                 {% if book.has_mp3_file %}
151                   <button class="l-button l-button--media" id="audiobook">pobierz audiobook</button>
152                   <ul>
153                     <li><a href="{% url 'download_zip_mp3' book.slug %}">mp3</a></li>
154                     {% if book.has_ogg_file %}
155                       <li><a href="{% url 'download_zip_ogg' book.slug %}">ogg</a></li>
156                     {% endif %}
157                     {% for dsy in book.media_daisy %}
158                       <li><a href="{{ dsy.file.url }}">DAISY</a></li>
159                     {% endfor %}
160                   </ul>
161                 {% endif %}
162               </div>
163               <div class="c-media__btn">
164                 <button class="l-button l-button--media" id="ebook">pobierz książkę</button>
165                 <ul>
166                   {% if book.pdf_file %}<li><a href="{{ book.pdf_url }}">PDF</a</li>{% endif %}
167                   {% if book.epub_file %}<li><a href="{{ book.epub_url }}">epub</a></li>{% endif %}
168                   {% if book.mobi_file %}<li><a href="{{ book.mobi_url }}">mobi</a></li>{% endif %}
169                 </ul>
170               </div>
171               <div class="c-media__btn">
172                 {% if book.get_first_text %}
173                 <a href="{% url 'book_text' book.get_first_text.slug %}">
174                   <div class="l-button l-button--media l-button--media--full">
175                     czytaj
176                   </div>
177                 </a>
178                 <!-- ul>
179                      <li>PDF</li>
180                      <li>epub</li>
181                      <li>mobi</li>
182                      </ul-->
183                 {% endif %}
184               </div>
185             </div>
186             {% if book.has_mp3_file %}
187             <div class="c-media__player">
188               <h2>słuchaj audiobooka w naszym serwisie</h2>
189               <div class="c-player">
190                 <button class="c-player__btn">
191                   <img src="{% static '2021/images/play.svg' %}" alt="słuchaj audiobooka w naszym serwisie">
192                 </button>
193                 <div class="c-player__timeline">
194                   <span></span>
195                   <time class="c-player__length">1h 20m</time>
196                 </div>
197               </div>
198             </div>
199             {% endif %}
200             <div class="c-media__popup" data-popup="ebook">
201               <div class="c-media__popup__box">
202                 <div class="c-media__popup__box__lead">
203                   <h2>Pobieranie e-booka</h2>
204                   <p>Wybierz wersję dla siebie:</p>
205                 </div>
206                 <div class="c-media__popup__box__items">
207                   {% if book.pdf_file %}
208                     <div class="c-media__popup__box__item">
209                       <div>
210                         <h3>.pdf</h3>
211                         <p>Jeśli planujesz wydruk albo lekturę na urządzeniu mobilnym bez dodatkowych aplikacji.</p>
212                       </div>
213                       <div>
214                         <a href="{{ book.pdf_url }}" class="l-button l-button--media l-button--media--full">.pdf</a>
215                       </div>
216                     </div>
217                   {% endif %}
218                   {% if book.epub_file %}
219                     <div class="c-media__popup__box__item">
220                       <div>
221                         <h3>.epub</h3>
222                         <p>Uniwersalny format e-booków, obsługiwany przez większość czytników sprzętowych i aplikacji na urządzenia mobilne.</p>
223                       </div>
224                       <div>
225                         <a href="{{ book.epub_url }}" class="l-button l-button--media l-button--media--full">.epub</a>
226                       </div>
227                     </div>
228                   {% endif %}
229                   {% if book.mobi_file %}
230                     <div class="c-media__popup__box__item">
231                       <div>
232                         <h3>.mobi</h3>
233                         <p>Natywny format dla czytnika Amazon Kindle.</p>
234                       </div>
235                       <div>
236                         <a href="{{ book.mobi_url }}" class="l-button l-button--media l-button--media--full">.mobi</a>
237                       </div>
238                     </div>
239                   {% endif %}
240                   {% if book.synchrobook_file %}
241                     <div class="c-media__popup__box__item">
242                       <div>
243                         <h3>synchrobook (epub3)</h3>
244                         <p>Książka elektroniczna i audiobook w jednym. Wymaga aplikacji obsługującej format (np. ..., ..., ...).</p>
245                       </div>
246                       <div>
247                         <a href="{{ book.synchrobook_url }}" class="l-button l-button--media l-button--media--full">synchrobook</a>
248                       </div>
249                     </div>
250                   {% endif %}
251                   <div class="c-media__popup__box__item">
252                     <div>
253                       <h3>inne formaty</h3>
254                       <ul>
255                         <li><a href="{{ book.txt_url }}">plik tekstowy (.txt)</a></li>
256                         <li><a href="{{ book.fb2_url }}">FictionBook</a></li>
257                       </ul>
258                     </div>
259                   </div>
260                 </div>
261                 <button class="c-media__popup__close">
262                   <img src="{% static '2021/images/close.svg' %}" alt="Zamknij">
263                 </button>
264               </div>
265             </div>
266             {% if book.has_mp3_file %}
267               <div class="c-media__popup" data-popup="audiobook">
268                 <div class="c-media__popup__box">
269                   <div class="c-media__popup__box__lead">
270                     <h2>Pobieranie audiobooka</h2>
271                     <p>Wybierz wersję dla siebie:</p>
272                   </div>
273                   <div class="c-media__popup__box__items">
274                     <div class="c-media__popup__box__item">
275                       <div>
276                         <h3>.mp3</h3>
277                         <p>Uniwersalny format, obsługiwany przez wszystkie urządzenia.</p>
278                       </div>
279                       <div>
280                         <a href="{% url 'download_zip_mp3' book.slug %}" class="l-button l-button--media l-button--media--full">.mp3</a>
281                       </div>
282                     </div>
283                     {% if book.has_ogg_file %}
284                     <div class="c-media__popup__box__item">
285                       <div>
286                         <h3>OggVorbis</h3>
287                         <p>Otwarty format plików audio, oferujący nagranie w najwyższej jakości dźwiękowej.</p>
288                       </div>
289                       <div>
290                         <a href="{% url 'download_zip_ogg' book.slug %}" class="l-button l-button--media l-button--media--full">.ogg</a>
291                       </div>
292                     </div>
293                     {% endif %}
294                     {% if book.has_daisy_file %}
295                     <div class="c-media__popup__box__item">
296                       <div>
297                         <h3>DAISY</h3>
298                         <p>Format dla osób z dysfunkcjami czytania.</p>
299                       </div>
300                       <div>
301                         {% for dsy in book.media_daisy %}
302                           <a href="{{ dsy.file.url }}" class="l-button l-button--media l-button--media--full">DAISY</a>
303                         {% endfor %}
304                       </div>
305                     </div>
306                     {% endif %}
307                     {% if book.synchrobook_file %}
308                     <div class="c-media__popup__box__item">
309                       <div>
310                         <h3>synchrobook</h3>
311                         <p>Książka elektroniczna i audiobook w jednym. Wymaga aplikacji obsługującej format.</p>
312                       </div>
313                       <div>
314                         <a href="{{ book.synchrobook_url }}" class="l-button l-button--media l-button--media--full">synchrobook</a>
315                       </div>
316                     </div>
317                     {% endif %}
318                   </div>
319                   <button class="c-media__popup__close">
320                     <img src="{% static '2021/images/close.svg' %}" alt="Zamknij">
321                   </button>
322                 </div>
323               </div>
324             {% endif %}
325           </div>
326
327           {{ book.abstract|safe }}
328
329         </article>
330       </section>
331
332
333       <section class="l-section">
334         <div class="c-support">
335           <h2>Ta książka jest dostępna dla tysięcy dzieciaków dzięki darowiznom od osób takich jak Ty!</h2>
336           <a href="/towarzystwo/">DORZUĆ SIĘ!</a>
337         </div>
338       </section>
339
340
341       {% for author in book.authors %}
342         <section class="l-section">
343           <div class="l-author">
344             <article class="l-author__info">
345               <h3>
346                 <a href="{{ author.get_absolute_url }}">
347                   {{ author.name }}
348                 </a>
349               </h3>
350
351               {{ author.description|safe }}
352
353             </article>
354             {% if HAVE_AUTHOR_PHOTO %}
355               <figure class="l-author__photo">
356                 <img src="" alt="{{ author.name }}">
357                 <figcaption>
358                 </figcaption>
359               </figure>
360             {% endif %}
361           </div>
362         </section>
363       {% endfor %}
364
365       {% with book.related_themes as themes %}
366         {% if themes %}
367           <section class="l-section">
368             <div class="l-themes__wrapper">
369               <h2>motywy występujące w tym utworze</h2>
370               <div class="l-themes">
371                 <ul>
372                   {% for item in themes %}
373                     <li><a href="{% url 'book_fragments' book.slug item.slug %}">{{ item|lower }}&nbsp;({{ item.count}})</a></li>
374                   {% endfor %}
375                 </ul>
376                 <a class="button" href="{% url 'theme_catalogue' %}">zobacz wszystkie motywy</a>
377               </div>
378             </div>
379           </section>
380         {% endif %}
381       {% endwith %}
382
383
384       <section class="l-section">
385         <div class="l-books__wrapper">
386           <h2>inne tytuły w naszej bibliotece</h2>
387           <div class="l-books">
388
389             {% if book.other_versions %}
390               {% for rel in book.other_versions %}
391
392                 <article class="l-books__item">
393                   <figure class="l-books__item__img">
394                     <a href="{{ rel.get_absolute_url }}">
395                       <img src="{% if rel.cover %}{{ rel.cover.url }}{% endif %}" alt="{{ rel.pretty_title }}">
396                     </a>
397                   </figure>
398                   <h3>
399                     {% for author in rel.authors %}
400                       <a href="{{ author.get_absolute_url }}">{{ author|upper }}</a>
401                     {% endfor %}
402                   </h3>
403                   <h2><a href="{{ rel.get_absolute_url }}">{{ rel.title }}</a></h2>
404                 </article>
405               {% endfor %}
406             {% endif %}
407
408             {% related_books_2021 book taken=book.other_versions|length as related_books %}
409             {% for rel in related_books %}
410               <article class="l-books__item">
411                 <figure class="l-books__item__img">
412                   <a href="{{ rel.get_absolute_url }}">
413                     <img src="{% if rel.cover %}{{ rel.cover.url }}{% endif %}" alt="{{ rel.pretty_title }}">
414                   </a>
415                 </figure>
416                 <h3>
417                   {% for author in rel.authors %}
418                     <a href="{{ author.get_absolute_url }}">{{ author|upper }}</a>
419                   {% endfor %}
420                 </h3>
421                 <h2><a href="{{ rel.get_absolute_url }}">{{ rel.title }}</a></h2>
422               </article>
423             {% endfor %}
424
425
426           </div>
427         </div>
428       </section>
429     </main>
430
431     <div class="l-footer">
432       <div class="l-footer__row">
433         <div class="l-footer__col">
434           <p>Wolne Lektury to projekt prowadzony przez fundację Nowoczesna Polska.</p>
435           <p>Reprodukcje cyfrowe wykonane przez Bibliotekę Narodową, Bibliotekę Śląską i Bibliotekę Elbląską z egzemplarzy pochodzących ze zbiorów BN, BŚ i BE.</p>
436           <p>Hosting: ICM.</p>
437         </div>
438         <div class="l-footer__col">
439           <ul>
440             <li>Fundacja Nowoczesna Polska</li>
441             <li>ul. Marszałkowska 84/92 lok. 125</li>
442             <li>00-514 Warszawa</li>
443           </ul>
444           <ul>
445             <li>tel: <a href="tel:+48226213017">(22) 621-30-17</a></li>
446             <li>e-mail: <a href="mailto:fundacja@nowoczesnapolska.org.pl">fundacja@nowoczesnapolska.org.pl</a></li>
447           </ul>
448         </div>
449       </div>
450       <div class="l-footer__row">
451         <p>
452           Nowa strona biblioteki Wolne Lektury powstała dzięki środkom otrzymanym w ramach Programu Operacyjnego Fundusz
453           Inicjatyw Obywatelskich, Senatu RP (zadanie realizowane w ramach zlecania przez Kancelarię Senatu zadań
454           w zakresie opieki nad Polonią i Polakami za granicą w 2011 r.) oraz Narodowego Instytutu Audiowizualnego
455           w ramach programu Dziedzictwo Cyfrowe.
456         </p>
457       </div>
458     </div>
459
460     <script src="{% static '2021/scripts/vendor.js' %}"></script>
461     <script src="{% static '2021/scripts/main.js' %}"></script>
462   </body>
463 </html>