fix reader
[wolnelektury.git] / src / wolnelektury / templates / main_page.html
old mode 100755 (executable)
new mode 100644 (file)
index d2b7556..3ae4bd3
-{% extends "base/base.html" %}
-{% load static from staticfiles %}
-{% load i18n catalogue_tags infopages_tags %}
-{% load ssi_include from ssify %}
-{% load cache %}
-{% get_current_language as LANGUAGE_CODE %}
-
-
-{% block title %}{% trans "Wolne Lektury internet library" %}{% endblock %}
-{% block ogtitle %}{% trans "Wolne Lektury internet library" %}{% endblock %}
-
-{% block body %}
-  {% spaceless %}
-    {% if cite %}
-      {% cache 3600 main_cite cite.pk %}
-        {% include "social/cite_promo.html" with main=True %}
-      {% endcache %}
+{% extends "base.html" %}
+{% load i18n %}
+{% load static %}
+{% load thumbnail %}
+{% load catalogue_tags %}
+{% load social_tags %}
+{% load sponsors %}
+
+{% block under-menu %}
+  {% comment %}
+    <div class="l-your-books">
+      <div class="l-container">
+        <div class="l-your-books__continue">
+          <div class="l-your-books__header">
+            <h3>Czytaj dalej</h3>
+          </div>
+          <div class="l-books">
+            <article class="l-books__item">
+              <figure class="l-books__item__img">
+                <a href="#">
+                  <img src="images/book-2.jpg" alt="Wstęp do filozofii">
+                </a>
+              </figure>
+              <div class="l-books__item__actions">
+                <a href="#"><i class="icon icon-book"></i></a>
+                <a href="#"><i class="icon icon-audio"></i></a>
+                <a href="#"><i class="icon icon-picture"></i></a>
+                <a href="#"><i class="icon icon-like"></i></a>
+              </div>
+              <h3><a href="#">Stanisław Brzozowski</a></h3>
+              <h2><a href="#">Wstęp do filozofii</a></h2>
+            </article>
+          </div>
+        </div>
+        <div class="l-your-books__shelf">
+          <div class="l-your-books__header">
+            <h3>Moja półka</h3>
+            <div class="l-your-books__header__actions">
+              <button class="js-prev-slide"><i class="icon icon-arrow-left"></i></button>
+              <button class="js-next-slide"><i class="icon icon-arrow-right"></i></button>
+            </div>
+          </div>
+          <div class="l-books">
+            <article class="l-books__item">
+              <figure class="l-books__item__img">
+                <a href="#">
+                  <img src="images/book-2.jpg" alt="Wstęp do filozofii">
+                </a>
+              </figure>
+              <div class="l-books__item__actions">
+                <a href="#"><i class="icon icon-book"></i></a>
+                <a href="#"><i class="icon icon-audio"></i></a>
+                <a href="#"><i class="icon icon-picture"></i></a>
+                <a href="#"><i class="icon icon-like"></i></a>
+              </div>
+              <h3><a href="#">Stanisław Brzozowski</a></h3>
+              <h2><a href="#">Wstęp do filozofii</a></h2>
+            </article>
+            <article class="l-books__item">
+              <figure class="l-books__item__img">
+                <a href="#">
+                  <img src="images/book-2.jpg" alt="Wstęp do filozofii">
+                </a>
+              </figure>
+              <div class="l-books__item__actions">
+                <a href="#"><i class="icon icon-book"></i></a>
+                <a href="#"><i class="icon icon-audio"></i></a>
+                <a href="#"><i class="icon icon-picture"></i></a>
+                <a href="#"><i class="icon icon-like"></i></a>
+              </div>
+              <h3><a href="#">Stanisław Brzozowski</a></h3>
+              <h2><a href="#">Wstęp do filozofii</a></h2>
+            </article>
+            <article class="l-books__item">
+              <figure class="l-books__item__img">
+                <a href="#">
+                  <img src="images/book-2.jpg" alt="Wstęp do filozofii">
+                </a>
+              </figure>
+              <div class="l-books__item__actions">
+                <a href="#"><i class="icon icon-book"></i></a>
+                <a href="#"><i class="icon icon-audio"></i></a>
+                <a href="#"><i class="icon icon-picture"></i></a>
+                <a href="#"><i class="icon icon-like"></i></a>
+              </div>
+              <h3><a href="#">Stanisław Brzozowski</a></h3>
+              <h2><a href="#">Wstęp do filozofii</a></h2>
+            </article>
+            <article class="l-books__item">
+              <figure class="l-books__item__img">
+                <a href="#">
+                  <img src="images/book-2.jpg" alt="Wstęp do filozofii">
+                </a>
+              </figure>
+              <div class="l-books__item__actions">
+                <a href="#"><i class="icon icon-book"></i></a>
+                <a href="#"><i class="icon icon-audio"></i></a>
+                <a href="#"><i class="icon icon-picture"></i></a>
+                <a href="#"><i class="icon icon-like"></i></a>
+              </div>
+              <h3><a href="#">Stanisław Brzozowski</a></h3>
+              <h2><a href="#">Wstęp do filozofii</a></h2>
+            </article>
+            <article class="l-books__item">
+              <figure class="l-books__item__img">
+                <a href="#">
+                  <img src="images/book-2.jpg" alt="Wstęp do filozofii">
+                </a>
+              </figure>
+              <div class="l-books__item__actions">
+                <a href="#"><i class="icon icon-book"></i></a>
+                <a href="#"><i class="icon icon-audio"></i></a>
+                <a href="#"><i class="icon icon-picture"></i></a>
+                <a href="#"><i class="icon icon-like"></i></a>
+              </div>
+              <h3><a href="#">Stanisław Brzozowski</a></h3>
+              <h2><a href="#">Wstęp do filozofii</a></h2>
+            </article>
+            <article class="l-books__item l-books__item--placeholder">
+              <figure class="l-books__item__img">
+                <a href="#">
+                  <img src="images/book-2.jpg" alt="Wstęp do filozofii">
+                </a>
+              </figure>
+              <div class="l-books__item__actions">
+                <a href="#"><i class="icon icon-book"></i></a>
+                <a href="#"><i class="icon icon-audio"></i></a>
+                <a href="#"><i class="icon icon-picture"></i></a>
+                <a href="#"><i class="icon icon-like"></i></a>
+              </div>
+              <h3><a href="#">Stanisław Brzozowski</a></h3>
+              <h2><a href="#">Wstęp do filozofii</a></h2>
+            </article>
+          </div>
+        </div>
+      </div>
+    </div>
+  {% endcomment %}
+{% endblock %}
+
+{% block global-content %}
+  <main class="l-main">
+
+    {% if widget %}
+      <div class="l-change-pop show"><p>{{ widget.description }}</p></div>
+      <section class="l-section">
+        <iframe src="{{ widget.url }}" style="width: 100%; height: 600px; border: none;"></iframe>
+      </section>
     {% endif %}
 
-    <section id="main-library">
-      <h1>{% trans "In our digital library you will find" %}</h1>
-      <div class="main-library-row">
-        <div class="covers">
-          {% for book in best %}
-            {% cache 86400 book_mini_box book.pk %}
-              {% include 'catalogue/book_mini_box.html' %}
-            {% endcache %}
-          {% endfor %}
+    {% if recommended_collection %}
+      <section class="l-section">
+        <div class="l-collections js-collections">
+          <div class="l-collections__header">
+            <h3><a href="{{ recommended_collection.get_absolute_url }}">{{ recommended_collection.title }}</a></h3>
+            <div class="l-your-books__header__actions">
+              <button class="js-prev-slide"><i class="icon icon-arrow-left"></i></button>
+              <button class="js-next-slide"><i class="icon icon-arrow-right"></i></button>
+            </div>
+          </div>
+          <div class="l-books">
+            {% for book in recommended_collection.get_books %}
+              {% include 'catalogue/book_box.html' %}
+            {% endfor %}
+          </div>
+          <div class="c-read_more">
+            <a href="/katalog/kolekcje/">{% trans "zobacz wszystkie kolekcje" %}</a>
+          </div>
+        </div>
+
+      </section>
+    {% endif %}
+
+    <section class="l-section">
+      <div class="p-homepage__info">
+        <div class="p-homepage__info__box p-homepage__info__box--carousel">
+          {% carousel 'main_2022' %}
+        </div>
+        <div class="p-homepage__info__box p-homepage__info__box--donate">
+          <figure>
+            <img src="{% static '2022/images/book-donate.svg' %}" alt="{% trans 'Dorzuć się!' %}">
+          </figure>
+          <div class="p-homepage__info__box__content">
+            <p>
+              {% blocktrans trimmed %}
+                Nasze książki są dostępne dla tysięcy
+                dzieciaków dzięki <strong>darowiznom</strong> od
+                osób takich jak <strong>Ty</strong>!
+              {% endblocktrans %}
+            </p>
+            <a href="{% url 'club_join' %}?pk_campaign=home" class="l-button l-button--default l-button--default--dark">{% trans "Dorzuć się!" %}</a>
+          </div>
         </div>
-        <a href="{% url "book_list" %}">
-          <div class="note white-box normal-text" style="font-size: 18px">
-            {% trans "and many other books, poems, pictures, audiobooks…" %}
+        <div class="p-homepage__info__box p-homepage__info__box--newsletter">
+          <figure>
+            <img src="{% static '2022/images/book-newsletter.svg' %}" alt="{% trans 'Zapisz się na nasz Newsletter!' %}">
+          </figure>
+          <div class="p-homepage__info__box__content">
+            <h3>
+              {% trans "Informacja o&nbsp;nowościach" %} <strong>{% trans "Newsletter!" %}</strong>
+            </h3>
+            <a href="{% url 'subscribe' %}?pk_campaign=home" class="l-button l-button--default">{% trans "Zapisz się" context "Newsletter" %}</a>
           </div>
-        </a>
+        </div>
       </div>
     </section>
 
-    <section id="main-theme">
-      <h1>{% trans "Motifs and themes" %}</h1>
-      <div class="white-box normal-text">
-        <h2>{% trans "Theme" %}: {{ theme }}</h2>
-        <p>{% trans "Explore works with the same theme" %}</p>
-        {% for book in theme_books %}
-          {% cache 86400 book_mini_box book.pk %}
-            {% include 'catalogue/book_mini_box.html' %}
-          {% endcache %}
+    <section class="l-section l-section--row">
+      <div class="l-quotes" style="">
+        {% for ambassador in ambassadors %}
+          <div class="l-quotes__item">
+            {% thumbnail ambassador.photo '100x100' crop="center" as ambphoto %}
+            <img src="{{ ambphoto.url  }}" alt="{{ ambassador.name }}">
+              {% endthumbnail %}
+              <h4>{{ ambassador.name }}</h4>
+              <p>
+                {{ ambassador.text }}
+              </p>
+          </div>
         {% endfor %}
-        {% if theme_fragment %}
-          {% cache 3600 fragment_promo theme_fragment.pk %}
-            {% include 'catalogue/fragment_promo.html' with fragment=theme_fragment %}
-          {% endcache %}
-        {% endif %}
       </div>
-      <a class="more" href="{% url 'theme_catalogue' %}">{% trans "See motifs catalog" %}</a>
-    </section>
 
-    {% comment %}
-    <section class="tag-box-section">
-      <h1>Autorzy</h1>
-      <a class="tag-box" href="{{ author.get_absolute_url }}">
-        {% ssi_include "catalogue_tag_box" pk=author.pk %}
-      </a>
-      <a class="more" href="{% url 'author_catalogue' %}">Zobacz katalog autorów</a>
-    </section>
+      <div class="l-quotes-ad" style="">
+        {% preview_ad_homepage %}
+      </div>
 
-    <section class="tag-box-section">
-      <h1>Gatunki</h1>
-      <a class="tag-box" href="{{ genre.get_absolute_url }}">
-        {% ssi_include "catalogue_tag_box" pk=genre.pk %}
-      </a>
-      <a class="more" href="{% url 'genre_catalogue' %}">Zobacz katalog gatunków</a>
     </section>
 
-    <section class="tag-box-section">
-      <h1>Rodzaje</h1>
-      <a class="tag-box" href="{{ kind.get_absolute_url }}">
-        {% ssi_include "catalogue_tag_box" pk=kind.pk %}
-      </a>
-      <a class="more" href="{% url 'kind_catalogue' %}">Zobacz katalog rodzajów</a>
+    <section class="l-section">
+      <div class="p-homepage__info p-homepage__info--second">
+        <div class="p-homepage__info__box p-homepage__info__box--full">
+          <figure>
+            <img src="{% static '2022/images/kid.png' %}" alt="{% trans 'Dorzuć się!' %}">
+          </figure>
+          <div class="p-homepage__info__box__content">
+            <p>
+              {% blocktrans trimmed %}
+                <strong>Wolne Lektury</strong> to lektury szkolne
+                i tysiące innych książek – za <strong>darmo</strong>
+                i <strong>bez rejestracji</strong>.
+              {% endblocktrans %}
+            </p>
+            <p>{% trans "Czytaj i słuchaj online, ściągaj na swój telefon lub komputer, dziel się z innymi." %}</p>
+            <p>{% trans "Dla uczennic i uczniów dodajemy przypisy, motywy literackie, biogramy i geotagowanie." %}</p>
+            <a href="{% url 'infopage' 'o-projekcie' %}?pk_campaign=wl-infobox" class="l-button l-button--default l-button--default--dark">{% trans "Dowiedz się więcej" %}</a>
+          </div>
+        </div>
+        <div class="p-homepage__info__box__rows">
+          <div class="p-homepage__info__box p-homepage__info__box--full--sm">
+            <figure>
+              <img src="{% static '2022/images/kid-2.png' %}" alt="{% trans 'Dorzuć się!' %}">
+            </figure>
+            <div class="p-homepage__info__box__content">
+              <p>
+                {% blocktrans trimmed %}
+                  Jesteśmy częścią ruchu <strong>wolnej kultury</strong>!
+                {% endblocktrans %}
+              </p>
+              <a href="https://fundacja.wolnelektury.pl/o-fundacji/?pk_campaign=wl-infobox" class="l-button l-button--default">{% trans "Dowiedz się więcej" %}</a>
+            </div>
+          </div>
+          <div class="p-homepage__info__box p-homepage__info__box--full--sm">
+            <figure>
+              <img src="{% static '2022/images/kid-3.png' %}" alt="{% trans 'Dorzuć się!' %}">
+            </figure>
+            <div class="p-homepage__info__box__content">
+              <p>
+                {% blocktrans trimmed %}
+                  Jak budujemy najpopularniejszą <strong>bibliotekę online</strong> w Polsce
+                {% endblocktrans %}
+              </p>
+              <a href="/info/jak-powstaja-wolne-lektury/" class="l-button l-button--default">{% trans "Dowiedz się więcej" %}</a>
+            </div>
+          </div>
+        </div>
+      </div>
     </section>
+  </main>
 
-    <section class="tag-box-section">
-      <h1>Epoki</h1>
-      <a class="tag-box" href="{{ epoch.get_absolute_url }}">
-        {% ssi_include "catalogue_tag_box" pk=epoch.pk %}
-      </a>
-      <a class="more" href="{% url 'epoch_catalogue' %}">Zobacz katalog epok</a>
-    </section>
-    {% endcomment %}
-
-    {% if collection %}
-      <section>
-        <h1>{% trans "Collections" %}</h1>
-        {% cache 3600 collection_box collection.pk LANGUAGE_CODE %}
-          {% include 'catalogue/collection_box.html' %}
-        {% endcache %}
-        <a class="more" href="{% url 'catalogue_collections' %}">{% trans "See collections catalog" %}</a>
-      </section>
-    {% endif %}
 
-    <section>
-      <h1>{% trans "Recent publications" %}</h1>
+  <section class="l-section">
+    <div class="l-collections js-collections">
+      <div class="l-collections__header">
+        <h3><a href="/katalog/nowe/">{% trans "Nowości" %}</a></h3>
+        <div class="l-your-books__header__actions">
+          <button class="js-prev-slide"><i class="icon icon-arrow-left"></i></button>
+          <button class="js-next-slide"><i class="icon icon-arrow-right"></i></button>
+        </div>
+      </div>
+      <div class="l-books" style="display:block;">
         {% for book in last_published %}
-          {% cache 86400 book_mini_box book.pk %}
-            {% include 'catalogue/book_mini_box.html' %}
-          {% endcache %}
+          {% include 'catalogue/book_box.html' %}
         {% endfor %}
-      <a class="more" href="{% url 'recent_list' %}">{% trans "More recent publications" %}</a>
-    </section>
-
-    <div class="clearboth"></div>
+      </div>
+    </div>
+  </section>
 
-    <section class="infopages-box">
-      <h1>{% trans "News" %}</h1>
-      {% ssi_include 'latest_blog_posts' %}
-    </section>
+  <div class="l-container">
+    <section class="l-section">
+      <div class="p-homepage__uptodate">
+        <div class="p-homepage__uptodate__header">
+          <h3>{% trans "Bądź na bieżąco" %}</h3>
+          <ul>
+            <li>
+              <a href="https://www.facebook.com/wolnelektury/"
+                 title="Facebook" tabindex="-1" target="_blank">
+                <i class="icon icon-fb" aria-hidden="true"></i>
+              </a>
+            </li>
+            <li>
+              <a href="https://www.youtube.com/c/WolneLekturyYT/"
+                 title="YouTube" tabindex="-1" target="_blank">
+                <i class="icon icon-yt" aria-hidden="true"></i>
+              </a>
+            </li>
+            <li>
+              <a href="https://www.instagram.com/wolnelektury/"
+                 title="Instagram" tabindex="-1" target="_blank">
+                <i class="icon icon-ig" aria-hidden="true"></i>
+              </a>
+            </li>
+            <li>
+              <a href="https://twitter.com/wolnelektury"
+                 title="Twitter" tabindex="-1" target="_blank">
+                <i class="icon icon-tt" aria-hidden="true"></i>
+              </a>
+            </li>
+          </ul>
+        </div>
 
-    <section class="infopages-box">
-      <h1>{% trans "Utilities" %}</h1>
-
-      <ul>
-        <li><a href="{% url 'suggest' %}" id="suggest" class="ajaxable">{% trans "Report a bug or suggestion" %}</a></li>
-        <!--li><a href="http://turniej.wolnelektury.pl">Turniej Elektrybałtów</a></li-->
-        <li><a href="{% url 'reporting_catalogue_pdf' %}">{% trans "Download the catalogue in PDF format." %}</a></li>
-        <li><a href="{% url 'dictionary_notes' %}">{% trans "Footnotes" %}</a></li>
-        <li><a href="{% url 'suggest_publishing' %}" id="suggest-publishing" class="ajaxable">{% trans "Missing a book?" %}</a></li>
-        <li><a href="{% url 'publish_plan' %}">{% trans "Publishing plan" %}</a></li>
-        <li><a href="{% url 'api' %}">API</a></li>
-        <li><a href="{% url 'oaipmh' %}">OAI-PMH</a></li>
-        <li><a href="{% url 'lesmianator' %}" lang="pl">Leśmianator</a></li>
-        <li><a href="http://polski.wolnelektury.pl" lang="pl">Materiały do nauki j. polskiego</a></li>
-      </ul>
-    </section>
+        {% sponsor_page 'footer' %}
 
-    <section class="infopages-box">
-      <h1>{% trans "Information" %}</h1>
-      <ul>
-        <li><a href="https://nowoczesnapolska.org.pl/prywatnosc/">{% trans "Privacy policy" %}</a></li>
-        {% infopages_on_main %}
-      </ul>
-
-      <div class="social-links">
-        <a href="https://pl-pl.facebook.com/pages/Wolne-Lektury/203084073268" title='Wolne Lektury @ Facebook'>
-          <img src="{% static "img/social/f.png" %}" alt="Wolne Lektury @ Facebook" />
-        </a>
-        <a href="https://nk.pl/profile/30441509" title='Wolne Lektury @ NK'>
-          <img src="{% static "img/social/nk.png" %}" alt="Wolne Lektury @ NK.pl" />
-        </a>
       </div>
     </section>
-  {% endspaceless %}
-{% endblock %}
+  </div>
 
-
-{% block add_footer %}
-  {% spaceless %}
-    {% if cite %}
-      <p>
-        {% trans "Image used:" %}
-        {% cache 3600 cite_info cite.pk %}
-          {% include 'social/cite_info.html' %}
-        {% endcache %}
-      </p>
-    {% endif %}
-  {% endspaceless %}
 {% endblock %}