406c703fc474fab331ca1920cec480dcadf447f4
[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                 <div class="l-button l-button--media">
151                   pobierz audiobook
152                 </div>
153                 <ul>
154                   <li>mp3</li>
155                   <li>ogg</li>
156                   <li>DAISY</li>
157                 </ul>
158               </div>
159               <div class="c-media__btn">
160                 <div class="l-button l-button--media">
161                   pobierz książkę
162                 </div>
163                 <ul>
164                   <li>PDF</li>
165                   <li>epub</li>
166                   <li>mobi</li>
167                 </ul>
168               </div>
169               <div class="c-media__btn">
170                 {#% if book.get_first_text %#}
171                   <a href="{#% url 'book_text' book.get_first_text.slug %#}">
172                     <div class="l-button l-button--media l-button--media--full">
173                       czytaj
174                     </div>
175                   </a>
176                   <!-- ul>
177                     <li>PDF</li>
178                     <li>epub</li>
179                     <li>mobi</li>
180                   </ul-->
181                 {#% endif %#}
182               </div>
183             </div>
184             <div class="c-media__player">
185               <h2>słuchaj audiobooka w naszym serwisie</h2>
186               <div class="c-player">
187                 <button class="c-player__btn">
188                   <img src="{% static '2021/images/play.svg' %}" alt="słuchaj audiobooka w naszym serwisie">
189                 </button>
190                 <div class="c-player__timeline">
191                   <span></span>
192                   <time class="c-player__length">1h 20m</time>
193                 </div>
194               </div>
195             </div>
196           </div>
197
198           {{ book.abstract|safe }}
199
200         </article>
201       </section>
202
203
204       <section class="l-section">
205         <div class="c-support">
206           <h2>Ta książka jest dostępna dla tysięcy dzieciaków dzięki darowiznom od osób takich jak Ty!</h2>
207           <a href="/towarzystwo/">DORZUĆ SIĘ!</a>
208         </div>
209       </section>
210
211
212       {% for author in book.authors %}
213         <section class="l-section">
214           <div class="l-author">
215             <article class="l-author__info">
216               <h3>
217                 <a href="{{ author.get_absolute_url }}">
218                   {{ author.name }}
219                 </a>
220               </h3>
221
222               {{ author.description|safe }}
223
224             </article>
225             {% if HAVE_AUTHOR_PHOTO %}
226               <figure class="l-author__photo">
227                 <img src="" alt="{{ author.name }}">
228                 <figcaption>
229                 </figcaption>
230               </figure>
231             {% endif %}
232           </div>
233         </section>
234       {% endfor %}
235
236       {% with book.related_themes as themes %}
237         {% if themes %}
238           <section class="l-section">
239             <div class="l-themes__wrapper">
240               <h2>motywy występujące w tym utworze</h2>
241               <div class="l-themes">
242                 <ul>
243                   {% for item in themes %}
244                     <li><a href="{% url 'book_fragments' book.slug item.slug %}">{{ item|lower }}&nbsp;({{ item.count}})</a></li>
245                   {% endfor %}
246                 </ul>
247                 <a class="button" href="{% url 'theme_catalogue' %}">zobacz wszystkie motywy</a>
248               </div>
249             </div>
250           </section>
251         {% endif %}
252       {% endwith %}
253
254
255       <section class="l-section">
256         <div class="l-books__wrapper">
257           <h2>inne tytuły w naszej bibliotece</h2>
258           <div class="l-books">
259
260             {% if book.other_versions %}
261               {% for rel in book.other_versions %}
262
263                 <article class="l-books__item">
264                   <figure class="l-books__item__img">
265                     <a href="{{ rel.get_absolute_url }}">
266                       <img src="{% if rel.cover %}{{ rel.cover.url }}{% endif %}" alt="{{ rel.pretty_title }}">
267                     </a>
268                   </figure>
269                   <h3>
270                     {% for author in rel.authors %}
271                       <a href="{{ author.get_absolute_url }}">{{ author|upper }}</a>
272                     {% endfor %}
273                   </h3>
274                   <h2><a href="{{ rel.get_absolute_url }}">{{ rel.title }}</a></h2>
275                 </article>
276               {% endfor %}
277             {% endif %}
278
279             {% related_books_2021 book taken=book.other_versions|length as related_books %}
280             {% for rel in related_books %}
281               <article class="l-books__item">
282                 <figure class="l-books__item__img">
283                   <a href="{{ rel.get_absolute_url }}">
284                     <img src="{% if rel.cover %}{{ rel.cover.url }}{% endif %}" alt="{{ rel.pretty_title }}">
285                   </a>
286                 </figure>
287                 <h3>
288                   {% for author in rel.authors %}
289                     <a href="{{ author.get_absolute_url }}">{{ author|upper }}</a>
290                   {% endfor %}
291                 </h3>
292                 <h2><a href="{{ rel.get_absolute_url }}">{{ rel.title }}</a></h2>
293               </article>
294             {% endfor %}
295
296
297           </div>
298         </div>
299       </section>
300     </main>
301
302     <div class="l-footer">
303       <div class="l-footer__row">
304         <div class="l-footer__col">
305           <p>Wolne Lektury to projekt prowadzony przez fundację Nowoczesna Polska.</p>
306           <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>
307           <p>Hosting: ICM.</p>
308         </div>
309         <div class="l-footer__col">
310           <ul>
311             <li>Fundacja Nowoczesna Polska</li>
312             <li>ul. Marszałkowska 84/92 lok. 125</li>
313             <li>00-514 Warszawa</li>
314           </ul>
315           <ul>
316             <li>tel: <a href="tel:+48226213017">(22) 621-30-17</a></li>
317             <li>e-mail: <a href="mailto:fundacja@nowoczesnapolska.org.pl">fundacja@nowoczesnapolska.org.pl</a></li>
318           </ul>
319         </div>
320       </div>
321       <div class="l-footer__row">
322         <p>
323           Nowa strona biblioteki Wolne Lektury powstała dzięki środkom otrzymanym w ramach Programu Operacyjnego Fundusz
324           Inicjatyw Obywatelskich, Senatu RP (zadanie realizowane w ramach zlecania przez Kancelarię Senatu zadań
325           w zakresie opieki nad Polonią i Polakami za granicą w 2011 r.) oraz Narodowego Instytutu Audiowizualnego
326           w ramach programu Dziedzictwo Cyfrowe.
327         </p>
328       </div>
329     </div>
330
331     <script src="{% static '2021/scripts/vendor.js' %}"></script>
332     <script src="{% static '2021/scripts/main.js' %}"></script>
333   </body>
334 </html>