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