librarian change
[wolnelektury.git] / src / wolnelektury / templates / 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 ssi_include ssi_csrf_token from ssify %}
9     {% load user_username user_is_staff from common_tags %}
10     <head>
11         <meta charset="utf-8">
12         <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
13         <meta name="application-name" content="Wolne Lektury"/>
14         <meta property="og:site_name" content="Wolne Lektury"/>
15         <meta property="og:title" content="{% block ogtitle %}{{ page_title }}{% endblock %}"/>
16         <meta property="og:type" content="{% block ogtype %}website{% endblock %}"/>
17         <meta property="og:image" content="{% block ogimage %}{{ FULL_STATIC_URL }}img/wiatrak.png{% endblock %}"/>
18         <meta name="description"
19               content="{% block metadescription %}Darmowe, opracowane, pełne teksty lektur, e-booki, audiobooki i pliki DAISY na wolnej licencji.{% endblock %}"/>
20         {% block ogextra %}{% endblock %}
21
22         <title>
23             {% block title %}{% block titleextra %}{{ page_title }}{% endblock %} :: {% trans "Wolne Lektury" %}{% endblock %}</title>
24         <link rel="icon" href="{% static 'img/favicon.png' %}" type="image/png"/>
25         <link rel="search" type="application/opensearchdescription+xml" title="Wolne Lektury"
26               href="{% static 'opensearch.xml' %}"/>
27         {% stylesheet "main" %}
28         {% block extrahead %}
29         {% endblock %}
30     </head>
31     <body id="{% block bodyid %}base{% endblock %}">
32
33     {% block bodycontent %}
34
35         {% if not funding_no_show_current %}
36             {% current_offer as current_offer %}
37             {{ current_offer.if }}
38             {% ssi_include 'funding_top_bar' pk=current_offer %}
39             {{ current_offer.endif }}
40         {% endif %}
41
42         <div id="whole-header">
43             <div id="header-wrapper">
44                 <header id="main">
45
46                     <a href="/" id="logo">
47                         <img src="{% static 'img/logo-neon.png' %}" alt="Wolne Lektury"/>
48                     </a>
49
50                     <p id="tagline">
51                         {% url 'book_list' as b %}
52                         {% url 'infopage' 'prawa' as r %}
53                         {% count_books book_count %}
54                         {% blocktrans count book_count as c %}
55                             <a href='{{ b }}'>{{ c }}</a> free reading you have <a href='{{ r }}'>right to</a>
56                         {% plural %}
57                             <a href='{{ b }}'>{{ c }}</a> free readings you have <a href='{{ r }}'>right to</a>
58                         {% endblocktrans %}
59                     </p>
60
61                     <div id="lang-menu" class="hoverget">
62                 <span id='lang-button' class='hoverclick'>
63                     <span class="lang-flag">⚐</span>
64                     <span class="label"> {% trans "Language" %}</span>
65                 </span>
66                         <div id="lang-menu-items">
67                             {% for lang in LANGUAGES %}
68                                 <form action="{% url 'django.views.i18n.set_language' %}" method="post">
69                                     {% ssi_csrf_token %}
70                                     <input type="hidden" name="language" value="{{ lang.0 }}"/>
71                                     <button type="submit" lang="{{ lang.0 }}"
72                                             class="{% ifequal lang.0 LANGUAGE_CODE %}active{% endifequal %}">{{ lang.1 }}</button>
73                                 </form>
74                             {% endfor %}
75                         </div>
76                     </div>
77
78                     <a id="show-menu"></a>
79                     <nav id="menu">
80
81                         <ul id="user-info">
82                             {% user_username as user_username %}
83                             {% user_is_staff as user_is_staff %}
84                             {{ user_username.if }}
85                             <li>
86                                 <a href="{% url 'user_settings' %}">
87                                     <strong>{{ user_username }}</strong>
88                                 </a>
89                             </li>
90                             <li><a href="{% url 'social_my_shelf' %}" id="user-shelves-link">{% trans "My shelf" %}</a>
91                             </li>
92                             {{ user_username.endif }}
93                             {{ user_is_staff.if }}
94                             <li><a href="/admin/">{% trans "Administration" %}</a></li>
95                             {{ user_is_staff.endif }}
96                             {{ user_username.if }}
97                             <li><a href="{% url 'logout' %}?next=
98
99
100                                     {% block logout %}{{ request.get_full_path }}{% endblock %}">{% trans "Logout" %}</a>
101                             </li>
102                             {{ user_username.else }}
103                             <li>
104                                 <a href="{% url 'login' %}?next={{ request.path }}" id="login">{% trans "Sign in" %}</a>
105                                 / <a href="{% url 'register' %}?next={{ request.path }}"
106                                      id="register">{% trans "Register" %}</a>
107                             </li>
108                             {{ user_username.endif }}
109                         </ul>
110
111
112                         <ul id="main-menu">
113                             <li><a href="{% url 'book_list' %}">{% trans "Literature" %}</a></li>
114                             <li><a href="{% url 'theme_catalogue' %}">{% trans "Themes" %}</a></li>
115                             <li><a href="{% url 'audiobook_list' %}">{% trans "Audiobooks" %}</a></li>
116                             <li><a href="{% url 'gallery' %}">{% trans "Gallery" %}</a></li>
117                             <li><a href="{% url 'catalogue' %}">Wszystkie utwory</a></li>
118                         </ul>
119
120
121                     </nav>
122
123                     <form id="search-area" action="{% url 'search' %}">
124                         <div id="search-field">
125                             <label for="search">{{ search_form.q.label }}</label>
126                             {{ search_form.q }}
127                         </div>
128                         <button type='submit'>{% trans "Search" %}</button>
129                     </form>
130
131                 </header>
132             </div>
133         </div>
134
135
136
137         <div id="main-content">
138             <div id="banners">
139                 <a href="https://nowoczesnapolska.org.pl/pomoz-nam/wesprzyj-nas/">
140                     <img src="{% static 'img/banners/960x150_wolneLektury.jpg' %}"
141                          alt="Wesprzyj działalność Nowoczesnej Polski"/>
142                 </a>
143             </div>
144             {% block body %}
145             {% endblock %}
146             <div class="clearboth"></div>
147         </div>
148
149
150         <div id="footer-wrapper">
151             <footer id="main">
152                 {% ssi_include 'chunk' key='footer' %}
153                 {% block add_footer %}{% endblock %}
154                 {% ssi_include 'sponsor_page' name='footer' %}
155             </footer>
156         </div>
157
158
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
168
169     {% endblock bodycontent %}
170
171
172     <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
173     <script type="text/javascript">var LANGUAGE_CODE = "{{ LANGUAGE_CODE }}";
174     var STATIC_URL = "{{ STATIC_URL }}";</script>
175     {% javascript "base" %}
176
177     {% tracking_code %}
178
179     {% block extrabody %}
180     {% endblock %}
181
182     <script src="{% static "js/contrib/modernizr.custom.19652.js" %}"></script>
183     </body>
184     </html>
185 {% endspaceless %}