1 {% extends '2022/base_real.html' %}
 
   4 {% load choose_cites from social_tags %}
 
   5 {% load catalogue_tags %}
 
   6 {% load likes_book from social_tags %}
 
   9 {% block global-content %}
 
  10     <div class="l-container">
 
  11       <div class="l-breadcrumb">
 
  12         <a href="/"><span>Strona główna</span></a>
 
  13         <a href="/katalog/lektury/"><span>Literatura</span></a>
 
  14         {% for ancestor in book.ancestors %}
 
  15           <a href="{{ ancestor.get_absolute_url }}">{{ ancestor.title }}</a>
 
  22       <section class="l-section">
 
  23         {% with first_text=book.get_first_text %}
 
  24           <aside class="l-aside">
 
  27                 <a href="{% url 'book_text' first_text.slug %}">
 
  29               <img src="{% if book.cover_clean %}{{ book.cover_clean.url }}{% endif %}" alt="{{ book.pretty_title }}" width="240">
 
  35             {% if book.parent or book.get_children %}
 
  36               <ul class="l-aside__zbiory">
 
  38                   {% for b in book.ancestors %}
 
  40                       <a href="{{ b.get_absolute_url }}">{{ b.title }}</a>
 
  43                   {% for b in book.get_siblings %}
 
  46                         <strong>{{ b.title }}</strong>
 
  48                           {% for c in book.get_children %}
 
  50                               <a href="{{ c.get_absolute_url }}">{{ c.title }}</a>
 
  55                         <a href="{{ b.get_absolute_url }}">{{ b.title }}</a>
 
  60                   {% for b in book.ancestor.all %}
 
  66                     <strong>{{ book.title }}</strong>
 
  68                       {% for c in book.get_children %}
 
  70                           <a href="{{ c.get_absolute_url }}">{{ c.title }}</a>
 
  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>
 
  86           <div class="l-content">
 
  87             <header class="l-header">
 
  88               <div class="l-header__content">
 
  89                 <p>{% for author in book.authors %}<a href="{{ author.get_absolute_url }}">{{ author.name }}</a>{% if not forloop.last %}, {% endif %}{% endfor %}
 
  91                 <h1><a href="{{ book.get_absolute_url }}">{{ book.title }}</a></h1>
 
  92                 {% if book.translators %}
 
  93                   <p class="l-header__translators">
 
  95                     {% for translator in book.translators %}
 
  96                       {{ translator }}{% if not forloop.last %}, {% endif %}
 
 101               <div class="l-header__actions">
 
 102                 {% likes_book book as likes %}
 
 104                   <form method='post' action='{% url 'social_unlike_book' book.slug %}'>
 
 106                     <button class="l-button l-button--fav">
 
 107                       <img src="{% static '2022/images/faved.svg' %}" alt="Usuń z ulubionych">
 
 111                   <form method='post' action='{% url 'social_like_book' book.slug %}'>
 
 113                     <button class="l-button l-button--fav">
 
 114                       <img src="{% static '2022/images/fav.svg' %}" alt="Dodaj do ulubionych">
 
 120             <article class="l-article">
 
 121               <div class="c-media">
 
 122                 <div class="c-media__actions">
 
 123                   <div class="c-media__btn">
 
 124                     {% if book.has_mp3_file %}
 
 125                       <button class="l-button l-button--media" id="audiobook"><i class="icon icon-audio"></i> pobierz audiobook</button>
 
 128                   <div class="c-media__btn">
 
 129                     <button class="l-button l-button--media" id="ebook"><i class="icon icon-book"></i> pobierz książkę</button>
 
 131                   <div class="c-media__btn">
 
 133                       <a href="{% url 'book_text' first_text.slug %}" class="l-button l-button--media l-button--media--full"><i class="icon icon-eye"></i> czytaj online</a>
 
 140                 {% if book.has_mp3_file %}
 
 141                   {% include 'catalogue/snippets/2022_jplayer.html' %}
 
 143                   {% with ch=book.get_child_audiobook %}
 
 145                       {% include 'catalogue/snippets/2022_jplayer_link.html' with book=ch %}
 
 154                 <div class="c-media__popup" data-popup="ebook">
 
 155                   <div class="c-media__popup__box">
 
 156                     <div class="c-media__popup__box__lead">
 
 157                       <h2>Pobieranie e-booka</h2>
 
 158                       <p>Wybierz wersję dla siebie:</p>
 
 160                     <div class="c-media__popup__box__items">
 
 161                       {% if book.pdf_file %}
 
 162                         <div class="c-media__popup__box__item">
 
 165                             <p>Jeśli planujesz wydruk albo lekturę na urządzeniu mobilnym bez dodatkowych aplikacji.</p>
 
 168                             <a href="{{ book.pdf_url }}" class="l-button l-button--media l-button--media--full">.pdf</a>
 
 172                       {% if book.epub_file %}
 
 173                         <div class="c-media__popup__box__item">
 
 176                             <p>Uniwersalny format e-booków, obsługiwany przez większość czytników sprzętowych i aplikacji na urządzenia mobilne.</p>
 
 179                             <a href="{{ book.epub_url }}" class="l-button l-button--media l-button--media--full">.epub</a>
 
 183                       {% if book.mobi_file %}
 
 184                         <div class="c-media__popup__box__item">
 
 187                             <p>Natywny format dla czytnika Amazon Kindle.</p>
 
 190                             <a href="{{ book.mobi_url }}" class="l-button l-button--media l-button--media--full">.mobi</a>
 
 194                       {% if book.synchro_file %}
 
 195                         <div class="c-media__popup__box__item">
 
 197                             <h3>synchrobook (epub3)</h3>
 
 198                             <p>Książka elektroniczna i audiobook w jednym. Wymaga aplikacji obsługującej format (np. ..., ..., ...).</p>
 
 201                             <a href="#" class="l-button l-button--media l-button--media--full">synchrobook</a>
 
 205                       {% if book.txt_file or book.fb2_file %}
 
 206                         <div class="c-media__popup__box__item">
 
 208                             <h3>inne formaty</h3>
 
 210                               <li><a href="{% url 'custom_pdf_form' book.slug %}">Stwórz własny PDF</a></li>
 
 211                               {% if book.txt_file %}<li><a href="{{ book.txt_url }}">plik tekstowy (.txt)</a></li>{% endif %}
 
 212                               {% if book.fb2_file %}<li><a href="{{ book.fb2_url }}">FictionBook</a></li>{% endif %}
 
 218                     <button class="c-media__popup__close">
 
 219                       <img src="{% static '2022/images/close.svg' %}" alt="Zamknij">
 
 223                 {% if book.has_mp3_file %}
 
 224                   <div class="c-media__popup" data-popup="audiobook">
 
 225                     <div class="c-media__popup__box">
 
 226                       <div class="c-media__popup__box__lead">
 
 227                         <h2>Pobieranie audiobooka</h2>
 
 228                         <p>Wybierz wersję dla siebie:</p>
 
 230                       <div class="c-media__popup__box__items">
 
 231                         <div class="c-media__popup__box__item">
 
 234                             <p>Uniwersalny format, obsługiwany przez wszystkie urządzenia.</p>
 
 237                             <a href="{% url 'download_zip_mp3' book.slug %}" class="l-button l-button--media l-button--media--full">.mp3</a>
 
 240                         {% if book.has_ogg_file %}
 
 241                           <div class="c-media__popup__box__item">
 
 244                               <p>Otwarty format plików audio, oferujący nagranie w najwyższej jakości dźwiękowej.</p>
 
 247                               <a href="{% url 'download_zip_ogg' book.slug %}" class="l-button l-button--media l-button--media--full">.ogg</a>
 
 251                         {% if book.has_daisy_file %}
 
 252                           <div class="c-media__popup__box__item">
 
 255                               <p>Format dla osób z dysfunkcjami czytania.</p>
 
 258                               {% for dsy in book.media_daisy %}
 
 259                                 <a href="{{ dsy.file.url }}" class="l-button l-button--media l-button--media--full">DAISY</a>
 
 264                         {% if book.has_audio_epub_file %}
 
 265                           <div class="c-media__popup__box__item">
 
 267                               <h3>EPUB + audiobook</h3>
 
 268                               <p>Książka elektroniczna i audiobook w jednym. Wymaga aplikacji obsługującej format.</p>
 
 271                               {% for epub in book.media_audio_epub %}
 
 272                                 <a href="{{ epub.file.url }}" class="l-button l-button--media l-button--media--full">EPUB+audio</a>
 
 278                       <button class="c-media__popup__close">
 
 279                         <img src="{% static '2022/images/close.svg' %}" alt="Zamknij">
 
 286               <div class="l-article__overlay" data-max-height="327">
 
 287                 {{ book.abstract|safe }}
 
 291                     <h4>Spis treści:</h4>
 
 296               <button class="l-article__read-more" aria-label="Kliknij aby rozwinąć" data-label="Czytaj więcej" data-action="Zwiń tekst">Czytaj więcej</button>
 
 298             <div class="c-support">
 
 300                 <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>
 
 301                 <a href="{% url 'club_join' %}?pk_campaign=layout">Dorzuć się!</a>
 
 304                 <img src="{% static '2022/images/dziecko.jpeg' %}" alt="Dorzuć się!">
 
 311       {% for author in book.authors %}
 
 312         <section class="l-section">
 
 313           <div class="l-author">
 
 314               {% include 'catalogue/2022/author_box.html' %}
 
 316             {% choose_cites 3 book=book as cites %}
 
 319                 <div class="l-author__quotes">
 
 320                   <div class="l-author__quotes__slider">
 
 321                     {% for fragment in cites %}
 
 322                       {% include "catalogue/2022/fragment_box.html" %}
 
 332       <section class="l-section">
 
 333         <div class="l-themes__wrapper">
 
 334           {% with book.related_themes as themes %}
 
 336               <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>
 
 337               <div class="l-themes l-article__overlay" data-max-height="80">
 
 339                   {% for item in themes %}
 
 340                     <li><a href="{% url 'book_fragments' book.slug item.slug %}">{{ item }} ({{ item.count}})</a></li>
 
 344               <button class="l-article__read-more" aria-label="Kliknij aby rozwinąć" data-label="Czytaj więcej" data-action="Zwiń tekst">Zobacz więcej</button>
 
 349             {% if book.wiki_link %}
 
 350               <li><a href="{{ book.wiki_link }}">strona utworu w Wikipedii</a></li>
 
 353               <a href="{{ book.xml_url }}">źródłowy plik XML</a>
 
 356               <a target="_blank" href="{% url 'poem_from_book' book.slug %}">miksuj treść utworu</a>
 
 359               <a target="_blank" href="{{ book.get_extra_info_json.about }}">utwór na Platformie Redakcyjnej</a>
 
 370     <section class="l-section">
 
 371       <div class="l-books__wrapper">
 
 372         <div class="l-container">
 
 373           <h2>Czytaj także</h2>
 
 374           <div class="l-books">
 
 375             {% if book.other_versions %}
 
 376               {% for rel in book.other_versions %}
 
 377                 <article class="l-books__item">
 
 378                   <figure class="l-books__item__img">
 
 379                     <a href="{{ rel.get_absolute_url }}">
 
 380                       <img src="{% if rel.cover_clean %}{{ rel.cover_clean.url }}{% endif %}" alt="{{ rel.pretty_title }}">
 
 384                     {% for author in rel.authors %}
 
 385                       <a href="{{ author.get_absolute_url }}">{{ author }}</a>
 
 388                   <h2><a href="{{ rel.get_absolute_url }}">{{ rel.title }}</a></h2>
 
 394             {% related_books_2022 book taken=book.other_versions|length as related_books %}
 
 395             {% for rel in related_books %}
 
 396               <article class="l-books__item">
 
 397                 <figure class="l-books__item__img">
 
 398                   <a href="{{ rel.get_absolute_url }}">
 
 399                     <img src="{% if rel.cover_clean %}{{ rel.cover_clean.url }}{% endif %}" alt="{{ rel.pretty_title }}">
 
 403                   {% for author in rel.authors %}
 
 404                     <a href="{{ author.get_absolute_url }}">{{ author|upper }}</a>
 
 407                 <h2><a href="{{ rel.get_absolute_url }}">{{ rel.title }}</a></h2>
 
 411             <article class="l-books__item l-books__item--link">
 
 412               <a href="/katalog/kolekcje/">i wiele innych książek, wierszy, obrazów, audiobooków…</a>
 
 413               <a href="/katalog/kolekcje/" class="icon-link"><i class="icon icon-all"></i></a>