fix
[wolnelektury.git] / src / wolnelektury / templates / base / superbase.html
1 <!DOCTYPE html>
2 {% spaceless %}
3   <html lang="{{ LANGUAGE_CODE }}" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#" class="{% if VARIANT %}{{ VARIANT }}{% endif %}">
4     {% load pipeline i18n %}
5     {% load static %}
6     {% load catalogue_tags funding_tags reporting_stats %}
7     {% load piwik_tags %}
8     {% load cache %}
9     {% load chunk from chunks %}
10     {% load sponsor_page from sponsors %}
11     {% load annoy_banner from annoy %}
12     {% get_current_language as LANGUAGE_CODE %}
13     <head>
14       <meta charset="utf-8">
15       <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
16       <meta name="application-name" content="Wolne Lektury" />
17       <meta property="og:site_name" content="Wolne Lektury" />
18       <meta property="og:title" content="{% block ogtitle %}{{ page_title }}{% endblock %}" />
19       <meta property="og:type" content="{% block ogtype %}website{% endblock %}" />
20       <meta property="og:image" content="{% block ogimage %}{{ FULL_STATIC_URL }}img/wiatrak.jpg{% endblock %}" />
21       <meta name="description" content="{% block metadescription %}Darmowe, opracowane, pełne teksty lektur, e-booki, audiobooki i pliki DAISY na wolnej licencji.{% endblock %}" />
22       {% block ogextra %}{% endblock %}
23
24       <title>
25         {% block title %}{% block titleextra %}{{ page_title }}{% endblock %} :: {% trans "Wolne Lektury" %}{% endblock %}
26       </title>
27       <link rel="icon" href="{% static 'img/favicon.png' %}" type="image/png"/>
28       <link rel="search" type="application/opensearchdescription+xml" title="Wolne Lektury"
29             href="{% static 'opensearch.xml' %}"/>
30       <link rel="manifest" href="/manifest.json">
31       {% stylesheet "main" %}
32       {% block extrahead %}{% endblock %}
33       {% tracking_code %}
34     </head>
35     <body id="{% block bodyid %}base{% endblock %}">
36       <ul id="skiplinks">
37         <li><a href="#main-content">{% trans "Go to content" %}</a></li>
38         <li><a id="skiplink-search" href="#search"">{% trans "Go to search" %}</a></li>
39         <li><a href="{% block footerlink %}#footer-wrapper{% endblock %}">{% trans "Go to page footer" %}</a></li>
40       </ul>
41
42       {% block bodycontent %}
43
44         {% block annoy %}
45           {% annoy_banner 'blackout' %}
46           {% annoy_banner 'top' %}
47           {% if not funding_no_show_current %}
48             {% cache 120 funding_top_bar LANGUAGE_CODE %}
49               {% funding_top_bar %}
50             {% endcache %}
51           {% endif %}
52         {% endblock %}
53
54         <div id="whole-header">
55           <div id="header-wrapper">
56             <header id="main">
57               <a href="/" id="logo">
58                 <img src="{% static 'img/logo-neon.png' %}" alt="Wolne Lektury"/>
59               </a>
60
61               <p id="tagline">
62                 {% url 'book_list' as b %}
63                 {% url 'infopage' 'prawa' as r %}
64                 {% count_books book_count %}
65                 {% blocktrans count book_count as c %}
66                   <a href='{{ b }}'>{{ c }}</a> free reading you have <a href='{{ r }}'>right to</a>
67                 {% plural %}
68                   <a href='{{ b }}'>{{ c }}</a> free readings you have <a href='{{ r }}'>right to</a>
69                 {% endblocktrans %}
70               </p>
71
72               <div id="lang-menu" class="hoverget">
73                 <span id='lang-button' class='hoverclick' tabindex="0">
74                   <img src="{% static "img/contrib/language/language.svg" %}" alt="">
75                   <span class="label"> {% trans "Language" %}</span>
76                 </span>
77                 <div id="lang-menu-items">
78                   {% for lang in LANGUAGES %}
79                     <form action="{% url 'set_language' %}" method="post">
80                       {% csrf_token %}
81                       <input type="hidden" name="language" value="{{ lang.0 }}"/>
82                       <button type="submit" lang="{{ lang.0 }}" tabindex="121"
83                               class="{% if lang.0 == LANGUAGE_CODE %}active{% endif %}">{{ lang.1 }}</button>
84                     </form>
85                   {% endfor %}
86                 </div>
87               </div>
88
89               <a id="show-menu"></a>
90               <nav id="menu">
91                 <ul id="user-info">
92                   {% if request.user.is_authenticated %}
93                     <li>
94                       <a href="{% url 'user_settings' %}">
95                         <strong>{{ request.user.username }}</strong>
96                       </a>
97                     </li>
98                     <li>
99                       <a href="{% url 'social_my_shelf' %}" id="user-shelves-link">{% trans "My shelf" %}</a>
100                     </li>
101                     {% if request.user.is_staff %}
102                       <li><a href="{% url 'admin:index' %}">{% trans "Administration" %}</a></li>
103                     {% endif %}
104                     <li>
105                       <a href="{% url 'logout' %}?next={% block logout %}{{ request.get_full_path }}{% endblock %}">{% trans "Logout" %}</a>
106                     </li>
107                   {% else %}
108                     <li>
109                       <a href="{% url 'login' %}?next={{ request.path }}" id="login">{% trans "Sign in" %}</a>
110                       / <a href="{% url 'register' %}?next={{ request.path }}" id="register">{% trans "Register" %}</a>
111                     </li>
112                   {% endif %}
113                 </ul>
114
115                 <ul id="main-menu-side">
116                   {% include "main_menu.html" %}
117                 </ul>
118               </nav>
119               <form id="search-area" action="{% url 'wlsearch' %}">
120                 <div id="search-field">
121                   <label for="search">{{ search_form.q.label }}</label>
122                   {{ search_form.q }}
123                 </div>
124                 <button type='submit'>{% trans "Search" %}</button>
125               </form>
126
127               <ul id="main-menu">
128                 {% include "main_menu.html" %}
129               </ul>
130
131
132
133             </header>
134           </div>
135         </div>
136
137         <div id="main-content">
138           {% comment %}
139           <div id="banners">
140             <a href="https://nowoczesnapolska.org.pl/pomoz-nam/wesprzyj-nas/">
141               <img src="{% static 'img/banners/960x150_wolneLektury.jpg' %}"
142                    alt="Wesprzyj działalność Nowoczesnej Polski"/>
143             </a>
144           </div>
145           {% endcomment %}
146           {% block body %}
147           {% endblock %}
148           <div class="clearboth"></div>
149         </div>
150
151         <div id="footer-wrapper">
152           <footer id="main">
153             {% chunk 'footer' %}
154             {% block add_footer %}{% endblock %}
155             {% sponsor_page 'footer' %}
156           </footer>
157         </div>
158
159         {# template #}
160         <div id="ajaxable-window" class='dialog-window'>
161           <div class="header"><a href="#" class="jqmClose">{% trans "Close" %}</a></div>
162           <div class="target">
163             <p><img src="{% static "img/indicator.gif" %}" alt="*"/> {% trans "Loading" %}</p>
164           </div>
165         </div>
166       {% endblock bodycontent %}
167
168       <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.7.1/jquery.min.js" integrity="sha512-BkBgWiL0N/EFIbLZYGTgbksKG5bS6PtwnWvVk3gccv+KhtK/4wkLxCRGh+kelKiXx7Ey4jfTabLg3AEIPC7ENA==" crossorigin="anonymous"></script>
169       <script type="text/javascript">
170         var LANGUAGE_CODE = "{{ LANGUAGE_CODE }}";
171         var STATIC_URL = "{{ STATIC_URL }}";
172       </script>
173       {% javascript "base" %}
174
175       {% block extrabody %}{% endblock %}
176
177       <script src="{% static "js/contrib/modernizr.custom.19652.js" %}"></script>
178     </body>
179   </html>
180 {% endspaceless %}