Missing logos.
[wolnelektury.git] / src / catalogue / templates / catalogue / book_text.html
1 {% extends "catalogue/viewer_base.html" %}
2 {% load i18n l10n %}
3 {% load catalogue_tags %}
4 {% load chunks %}
5 {% load thumbnail %}
6 {% load annoy_banners from annoy %}
7
8
9 {% block title %}{{ book.pretty_title }}{% endblock %}
10
11
12 {% block extrahead %}
13   <link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css"
14         integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A=="
15         crossorigin=""/>
16   <script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js"
17           integrity="sha512-XQoYMqMTK8LvdxXYG3nZ448hOEQiglfqkJs1NOQV44cWnUrBc8PkAOcXy20w0vlaXaVUearIOBhiXZ5V3ynxwA=="
18           crossorigin=""></script>
19 {% endblock %}
20
21 {% block menu %}
22   <li>
23     <a href="{{ book.get_absolute_url }}" id="menu-book" data-box="book-short">
24       <span class="label">{% trans "Kliknij, by pobrać" %}:</span>
25       <img src="{% if book.cover_clean %}{% thumbnail book.cover_clean '240x332' as thumb %}{{ thumb.url }}{% empty %}{{ book.cover_clean.url }}{% endthumbnail %}{% endif %}"
26            width="120" height="166"
27            alt="{{ book.pretty_title }}"
28            title="{{ book.pretty_title }}">
29     </a>
30   </li>
31
32   {% if book.other_versions.exists %}
33     <li id="menu-other">
34       <a href="#" data-box="other">
35         <span class="label">{% trans "Inne wersje" %}</span>
36       </a>
37     </li>
38   {% endif %}
39
40   <li id="menu-toc">
41     <a href="#" data-box="wltoc">
42       <span class="label">{% trans "Spis treści" %}</span>
43     </a>
44   </li>
45
46   <li id="menu-themes">
47     <a href="#" data-box="themes">
48       <span class="label">{% trans "Motywy" %}</span>
49     </a>
50   </li>
51
52   <li id="menu-nota_red">
53     <a href="#" data-box="nota_red">
54       <span class="label">{% trans "Nota red." %}</span>
55     </a>
56   </li>
57
58   <li id="menu-info">
59     <a href="#info" data-box="info">
60       <span class="label">{% trans "Informacje" %}</span>
61     </a>
62   </li>
63
64   {% if extra_info.logo_mono %}
65   {% thumbnail extra_info.logo_mono '200x200' as th %}
66     <img src="{{ th.url }}" style="width: 100px; padding: 10px;">
67   {% endthumbnail %}
68   {% endif %}
69
70   <a href="#" class="settings-switch" id="settings-line-numbers"
71      data-setting="always-hide-line-numbers"><span>{% trans "Numeracja" %}</span></a>
72   <a href="#" class="settings-switch" id="settings-themes"
73      data-setting="always-hide-themes"><span>{% trans "Motywy" %}</span></a>
74   <a href="#" class="settings-switch" id="settings-annotations"
75      data-setting="no-annotations"><span>{% trans "Przypisy" %}</span></a>
76   <a href="#" class="settings-switch" id="settings-references"
77      data-setting="no-references"><span>{% trans "Pinezki" %}</span></a>
78
79 {% endblock menu %}
80
81
82 {% block big-pane %}
83
84   <article id="main-text">
85     {% with next=book.get_next_text prev=book.get_prev_text %}
86       {% if next %}
87         <a style="float:right; padding: 1em;" href="{% url 'book_text' next.slug %}">{{ next.title }}&nbsp;&rarr;</a>
88       {% endif %}
89       {% if prev %}
90         <a style="display:inline-block;padding: 1em;" href="{% url 'book_text' prev.slug %}">&larr;&nbsp;{{ prev.title }}</a>
91       {% endif %}
92       <div style="text-align:center; margin-top:1em;">
93         {% content_warning book %}
94       </div>
95       <div style="clear:both;"></div>
96       {{ book_text|safe }}
97     {% endwith %}
98   </article>
99
100
101
102   <article id="other-text">
103     <a class="other-text-close" href="#">{% trans "Zamknij" %}</a>
104     <div id="other-text-waiter">{% trans "Proszę czekać..." %}</div>
105     <div id="other-text-body" style="display: none;"></div>
106   </article>
107
108   <div id="reference-box">
109     <div id="reference-map"></div>
110     <a id="reference-close" href="#">x</a>
111     <div id="reference-images">
112     </div>
113     <a id="reference-link" target="_blank"></a>
114   </div>
115
116
117
118
119 {% endblock big-pane %}
120
121 {% block footer %}
122   {% if book.has_sync_file %}
123     <div id="player-bar">
124       {% include 'catalogue/snippets/jplayer_reader.html' %}
125     </div>
126     <script type="application/json" id="smil">
127      {{ book.get_sync|safe }}
128     </script>
129   {% endif %}
130   <div id="wltoc" class="box">
131     {% if book.parent %}
132       {% for b in book.ancestors %}
133         {% if forloop.counter > 1 %}
134           <li>
135         {% endif %}
136         <a href="{% if b.html_file %}{% url 'book_text' b.slug %}{% else %}{{ b.get_absolute_url }}{% endif %}">{{ b.title }}</a>
137         <ol>
138       {% endfor %}
139       {% for b in book.get_siblings %}
140         <li>
141           {% if b == book %}
142             <strong>{{ b.title }}</strong>
143             <div id="heretoc"></div>
144           {% else %}
145             <a href="{% url 'book_text' b.get_first_text.slug %}">{{ b.title }}</a>
146           {% endif %}
147         </li>
148       {% endfor %}
149
150       {% for b in book.ancestor.all %}
151         </ol>
152         {% if not forloop.counter.last %}
153           </li>
154         {% endif %}
155       {% endfor %}
156     {% else %}
157       <strong>{{ book.title }}</strong>
158       <div id="heretoc"></div>
159       <ol>
160         {% for c in book.get_children %}
161           <li><a href="{% url 'book_text' c.get_first_text.slug %}">{{ c.title }}</a></li>
162         {% endfor %}
163       </ol>
164     {% endif %}
165   </div>
166
167   <div id="info" class="box">
168     {% book_info book %}
169   </div>
170
171   {% if book.other_versions.exists %}
172     <div class="box" id="other">
173       <h2>{% trans "Inne wersje utworu" %}</h2>
174       <a class="other-text-close" href="#">{% trans "Zamknij drugą wersję" %}</a>
175       <ul>
176         {% spaceless %}
177           {% for other_version in book.other_versions %}
178             <li>
179               <a class="display-other"
180                  data-other="{{ other_version.html_url }}"
181                  href="{% url 'book_text' other_version.slug %}">
182                 {{ other_version.mini_box_nolink }}
183               </a>
184             </li>
185           {% endfor %}
186         {% endspaceless %}
187       </ul>
188     </div>
189   {% endif %}
190
191   <div class="box" id="book-short">
192     {% include 'catalogue/book_short.html' %}
193   </div>
194
195   <div id="annoy-stubs">
196     {% annoy_banners 'book-text-intermission' %}
197
198     {% for insert in inserts %}
199       {% include 'annoy/dynamic_insert.html' %}
200     {% endfor %}
201   </div>
202
203
204   <div id="marker">
205
206   </div>
207
208   {% localize off %}
209   <script type="application/json" id="interesting-references">
210    {
211        {% for ref in book.references %}
212        {% if ref.entity.is_interesting %}
213        "{{ ref.entity.uri }}": {
214            {% if ref.entity.lat and ref.entity.lon %}
215            "location": [{{ ref.entity.lat }}, {{ ref.entity.lon }}],
216            {% endif %}
217            "images": {{ ref.entity.images|safe }},
218            "label": "{{ ref.entity.label }}",
219            "description": "{{ ref.entity.description }}",
220            "wikipedia_link": "{{ ref.entity.wikipedia_link }}"
221        },
222        {% endif %}
223        {% endfor %}
224        "": null
225    }
226   </script>
227
228   {% endlocalize %}
229 {% endblock footer %}