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