Pretty usable.
[wolnelektury.git] / src / catalogue / templates / catalogue / 2021 / book_detail.html
index d44abc5..8c9beb3 100644 (file)
   <body>
 
     <nav class="l-navigation">
+      <div class="l-change-pop">
+        <h3>Zmieniamy się!</h3>
+        <p>
+          Jeżeli to czytasz jesteś jedną z osób, której prezentujemy nowy wygląd strony książki.
+          Będziemy bardzo! wdzięczni za Twoją opinię – w prawym dolnym rogu znajdziesz przycisk oceny.
+          Jeżeli wolisz klasyczny wygląd - wystarczy, że <a class="quit-experiment" href="#">klikniesz tutaj</a>
+        </p>
+        <button class="l-change-pop__close">
+          <i class="icon icon-close"></i>
+        </button>
+      </div>
       <div class="l-container">
         <a href="/" class="l-navigation__logo">
           <img src="{% static "2022/images/logo.png" %}" alt="WolneLektury.pl">
@@ -61,7 +72,7 @@
       <section class="l-section">
         <aside class="l-aside">
           <figure>
-            <img src="{% if book.cover_thumb %}{{ book.cover_thumb.url }}{% endif %}" alt="{{ book.pretty_title }}" width="238">
+            <img src="{% if book.cover_clean %}{{ book.cover_clean.url }}{% endif %}" alt="{{ book.pretty_title }}" width="240">
           </figure>
           <ul class="l-aside__info">
             <li><span>Epoka:</span> {% for tag in book.epochs %}<a href="{{ tag.get_absolute_url }}">{{ tag.name|lower }}</a> {% endfor %}</li>
               </p>
               <h1>{{ book.title }}</h1>
             </div>
-            <div class="l-header__actions">
+            <!-- div class="l-header__actions">
               <button class="l-button l-button--fav">
                 <img src="{% static '2022/images/fav.svg' %}" alt="Dodaj do ulubionych">
               </button>
-            </div>
+            </div-->
           </header>
           <article class="l-article">
             <div class="c-media">
 
               {% if book.has_mp3_file %}
                 {% include 'catalogue/snippets/2022_jplayer.html' %}
+              {% else %}
+                {% with ch=book.get_child_audiobook %}
+                  {% if ch %}
+                    {% include 'catalogue/snippets/2022_jplayer_link.html' with book=ch %}
+                  {% endif %}
+                {% endwith %}
+
               {% endif %}
 
 
               <h3>Opis</h3>
               {{ book.abstract|safe }}
 
-              <h4>Spis treści:</h4>
-              <ul>
-                <li>Dziady. Poema</li>
-                <li>Przedmowa</li>
-                <li>Upiór</li>
-                <li>Dziady, część II</li>
-                <li>Dziady, część IV</li>
-                <li>Dziady, część III</li>
-                <li>Dziady. Widowisko, część I</li>
-              </ul>
+              {% if book.toc %}
+                <h4>Spis treści:</h4>
+                {{ book.toc|safe }}
+              {% endif %}
             </div>
             <button class="l-article__read-more" aria-label="Kliknij aby rozwinąć" data-label="Czytaj więcej" data-action="Zwiń tekst">Czytaj więcej</button>
           </article>
-        </div>
-      </section>
-      <section class="l-section">
-        <div class="c-support">
-          <h2>Ta książka jest dostępna dla tysięcy dzieciaków dzięki darowiznom od osób takich jak Ty!</h2>
-          <figure>
-            <img src="{% static '2022/images/img-1.jpg' %}" alt="Dorzuć się!">
-            <a href="/towarzystwo/">Dorzuć się!</a>
-          </figure>
+          <div class="c-support">
+            <div>
+              <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>
+              <a href="/towarzystwo/">Dorzuć się!</a>
+            </div>
+            <figure>
+              <img src="{% static '2022/images/img-1.jpg' %}" alt="Dorzuć się!">
+            </figure>
+          </div>
         </div>
       </section>
 
               </div>
             </div>
 
-            <div class="row">
-              <div class="l-author__quotes">
-                <div class="l-author__quotes__slider">
-                  {% choose_cites book 3 as cites %}
-                  {% for fragment in cites %}
-                    <div class="l-author__quotes__slider__item">
-                      <em>
-                        {{ fragment.short_text|safe }}
-                      </em>
-                      <p>{{ fragment.book.pretty_title }}</p>
-                    </div>
-                  {% endfor %}
+            {% choose_cites book 3 as cites %}
+            {% if cites %}
+              <div class="row">
+                <div class="l-author__quotes">
+                  <div class="l-author__quotes__slider">
+                    {% for fragment in cites %}
+                      <div class="l-author__quotes__slider__item">
+                        <em>
+                          {{ fragment.short_text|safe }}
+                        </em>
+                        <p>{{ fragment.book.pretty_title }}</p>
+                      </div>
+                    {% endfor %}
+                  </div>
                 </div>
               </div>
-            </div>
+            {% endif %}
           </div>
       </section>
       {% endfor %}