Enable A/B test for blackout.
[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#">
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
37       {% block bodycontent %}
38
39         {% block annoy %}
40           {% if AB.BLACKOUT %}
41             {% annoy_banner 'blackout' %}
42           {% endif %}
43           {% annoy_banner 'top' %}
44           {% if not funding_no_show_current %}
45             {% cache 120 funding_top_bar LANGUAGE_CODE %}
46               {% funding_top_bar %}
47             {% endcache %}
48           {% endif %}
49         {% endblock %}
50
51         <div id="whole-header">
52           <div id="header-wrapper">
53             <header id="main">
54               <a href="/" id="logo">
55                 <img src="{% static 'img/logo-neon.png' %}" alt="Wolne Lektury"/>
56               </a>
57
58               <p id="tagline">
59                 {% url 'book_list' as b %}
60                 {% url 'infopage' 'prawa' as r %}
61                 {% count_books book_count %}
62                 {% blocktrans count book_count as c %}
63                   <a href='{{ b }}'>{{ c }}</a> free reading you have <a href='{{ r }}'>right to</a>
64                 {% plural %}
65                   <a href='{{ b }}'>{{ c }}</a> free readings you have <a href='{{ r }}'>right to</a>
66                 {% endblocktrans %}
67               </p>
68
69               <div id="lang-menu" class="hoverget">
70                 <span id='lang-button' class='hoverclick'>
71                   <img src="{% static "img/contrib/language/language.svg" %}" alt="{% trans "Language" %}">
72                   <span class="label"> {% trans "Language" %}</span>
73                 </span>
74                 <div id="lang-menu-items">
75                   {% for lang in LANGUAGES %}
76                     <form action="{% url 'set_language' %}" method="post">
77                       {% csrf_token %}
78                       <input type="hidden" name="language" value="{{ lang.0 }}"/>
79                       <button type="submit" lang="{{ lang.0 }}"
80                               class="{% ifequal lang.0 LANGUAGE_CODE %}active{% endifequal %}">{{ lang.1 }}</button>
81                     </form>
82                   {% endfor %}
83                 </div>
84               </div>
85
86               <a id="show-menu"></a>
87               <nav id="menu">
88                 <ul id="user-info">
89                   {% if request.user.is_authenticated %}
90                     <li>
91                       <a href="{% url 'user_settings' %}">
92                         <strong>{{ request.user.username }}</strong>
93                       </a>
94                     </li>
95                     <li>
96                       <a href="{% url 'social_my_shelf' %}" id="user-shelves-link">{% trans "My shelf" %}</a>
97                     </li>
98                     {% if request.user.is_staff %}
99                       <li><a href="{% url 'admin:index' %}">{% trans "Administration" %}</a></li>
100                     {% endif %}
101                     <li>
102                       <a href="{% url 'logout' %}?next={% block logout %}{{ request.get_full_path }}{% endblock %}">{% trans "Logout" %}</a>
103                     </li>
104                   {% else %}
105                     <li>
106                       <a href="{% url 'login' %}?next={{ request.path }}" id="login">{% trans "Sign in" %}</a>
107                       / <a href="{% url 'register' %}?next={{ request.path }}" id="register">{% trans "Register" %}</a>
108                     </li>
109                   {% endif %}
110                 </ul>
111
112                 <ul id="main-menu">
113                   <li{% if active_menu_item == 'club' %} class="active"{% endif %}>
114                     <a href="{% url 'club_join' %}">{% trans "Wesprzyj nas" %}</a>
115                   </li>
116                   <li{% if active_menu_item == 'books' %} class="active"{% endif %}>
117                     <a href="{% url 'book_list' %}">{% trans "Literature" %}</a>
118                   </li>
119                   <li{% if active_menu_item == 'theme' %} class="active"{% endif %}>
120                     <a href="{% url 'theme_catalogue' %}">{% trans "Themes" %}</a>
121                   </li>
122                   <li{% if active_menu_item == 'audiobooks' %} class="active"{% endif %}>
123                     <a href="{% url 'audiobook_list' %}">{% trans "Audiobooks" %}</a>
124                   </li>
125                   <li{% if active_menu_item == 'all_works' %} class="active"{% endif %}>
126                     <a href="{% url 'catalogue' %}">{% trans "All works" %}</a>
127                   </li>
128                   <li>
129                     <a href="{% url 'subscribe' %}">{% trans "Newsletter" %}</a>
130                   </li>
131                 </ul>
132               </nav>
133               <form id="search-area" action="{% url 'wlsearch' %}">
134                 <div id="search-field">
135                   <label for="search">{{ search_form.q.label }}</label>
136                   {{ search_form.q }}
137                 </div>
138                 <button type='submit'>{% trans "Search" %}</button>
139               </form>
140             </header>
141           </div>
142         </div>
143
144         <div id="main-content">
145           {% comment %}
146           <div id="banners">
147             <a href="https://nowoczesnapolska.org.pl/pomoz-nam/wesprzyj-nas/">
148               <img src="{% static 'img/banners/960x150_wolneLektury.jpg' %}"
149                    alt="Wesprzyj działalność Nowoczesnej Polski"/>
150             </a>
151           </div>
152           {% endcomment %}
153           {% block body %}
154           {% endblock %}
155           <div class="clearboth"></div>
156         </div>
157
158         <div id="footer-wrapper">
159           <footer id="main">
160             {% chunk 'footer' %}
161             {% block add_footer %}{% endblock %}
162             {% sponsor_page 'footer' %}
163           </footer>
164         </div>
165
166         {# template #}
167         <div id="ajaxable-window" class='dialog-window'>
168           <div class="header"><a href="#" class="jqmClose">{% trans "Close" %}</a></div>
169           <div class="target">
170             <p><img src="{% static "img/indicator.gif" %}" alt="*"/> {% trans "Loading" %}</p>
171           </div>
172         </div>
173       {% endblock bodycontent %}
174
175       <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>
176       <script type="text/javascript">
177         var LANGUAGE_CODE = "{{ LANGUAGE_CODE }}";
178         var STATIC_URL = "{{ STATIC_URL }}";
179       </script>
180       {% javascript "base" %}
181
182       {% block extrabody %}{% endblock %}
183
184       <script src="{% static "js/contrib/modernizr.custom.19652.js" %}"></script>
185     </body>
186   </html>
187 {% endspaceless %}