ADS system
[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 %}{% 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"
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 %}{% trans "Wolne Lektury" %} :: {% block titleextra %}{% endblock %}{% 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         <div id="ads">
42             <a href="https://nowoczesnapolska.org.pl/pomoz-nam/wesprzyj-nas/">
43                 <img src="{% static 'img/ads/960x150_wolneLektury.jpg' %}"
44                      alt="Wesprzyj działalność Nowoczesnej Polski"/>
45             </a>
46         </div>
47         <div id="whole-header">
48             <div id="header-wrapper">
49                 <header id="main">
50
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 'django.views.i18n.set_language' %}" method="post">
74                                     {% ssi_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
86                         <ul id="user-info">
87                             {% user_username as user_username %}
88                             {% user_is_staff as user_is_staff %}
89                             {{ user_username.if }}
90                             <li>
91                                 <a href="{% url 'user_settings' %}">
92                                     <strong>{{ user_username }}</strong>
93                                 </a>
94                             </li>
95                             <li><a href="{% url 'social_my_shelf' %}" id="user-shelves-link">{% trans "My shelf" %}</a>
96                             </li>
97                             {{ user_username.endif }}
98                             {{ user_is_staff.if }}
99                             <li><a href="/admin/">{% trans "Administration" %}</a></li>
100                             {{ user_is_staff.endif }}
101                             {{ user_username.if }}
102                             <li><a href="{% url 'logout' %}?next=
103
104                                     {% block logout %}{{ request.get_full_path }}{% endblock %}">{% trans "Logout" %}</a>
105                             </li>
106                             {{ user_username.else }}
107                             <li>
108                                 <a href="{% url 'login' %}?next={{ request.path }}" id="login">{% trans "Sign in" %}</a>
109                                 / <a href="{% url 'register' %}?next={{ request.path }}"
110                                      id="register">{% trans "Register" %}</a>
111                             </li>
112                             {{ user_username.endif }}
113                         </ul>
114
115
116                         <ul id="main-menu">
117                             <li{% if active_menu_item == 'books' %} class="active"{% endif %}>
118                                 <a href="{% url 'book_list' %}">{% trans "Literature" %}</a>
119                             </li>
120                             <li{% if active_menu_item == 'theme' %} class="active"{% endif %}>
121                                 <a href="{% url 'theme_catalogue' %}">{% trans "Themes" %}</a>
122                             </li>
123                             <li{% if active_menu_item == 'audiobooks' %} class="active"{% endif %}>
124                                 <a href="{% url 'audiobook_list' %}">{% trans "Audiobooks" %}</a>
125                             </li>
126                             <li{% if active_menu_item == 'gallery' %} class="active"{% endif %}>
127                                 <a href="{% url 'gallery' %}">{% trans "Gallery" %}</a>
128                             </li>
129                             <li{% if active_menu_item == 'all_works' %} class="active"{% endif %}>
130                                 <a href="{% url 'catalogue' %}">{% trans "All works" %}</a>
131                             </li>
132                         </ul>
133
134
135                     </nav>
136
137                     <form id="search-area" action="{% url 'search' %}">
138                         <div id="search-field">
139                             <label for="search">{{ search_form.q.label }}</label>
140                             {{ search_form.q }}
141                         </div>
142                         <button type='submit'>{% trans "Search" %}</button>
143                     </form>
144
145                 </header>
146             </div>
147         </div>
148
149
150
151         <div id="main-content">
152             {% block body %}
153             {% endblock %}
154             <div class="clearboth"></div>
155         </div>
156
157
158         <div id="footer-wrapper">
159             <footer id="main">
160                 {% ssi_include 'chunk' key='footer' %}
161                 {% block add_footer %}{% endblock %}
162                 {% ssi_include 'sponsor_page' name='footer' %}
163             </footer>
164         </div>
165
166
167
168         {# template #}
169         <div id="ajaxable-window" class='dialog-window'>
170             <div class="header"><a href="#" class="jqmClose">{% trans "Close" %}</a></div>
171             <div class="target">
172                 <p><img src="{% static "img/indicator.gif" %}" alt="*"/> {% trans "Loading" %}</p>
173             </div>
174         </div>
175
176
177     {% endblock bodycontent %}
178
179
180     <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
181     <script type="text/javascript">var LANGUAGE_CODE = "{{ LANGUAGE_CODE }}";
182     var STATIC_URL = "{{ STATIC_URL }}";</script>
183     {% javascript "base" %}
184
185     {% tracking_code %}
186
187     {% block extrabody %}
188     {% endblock %}
189
190     <script src="{% static "js/contrib/modernizr.custom.19652.js" %}"></script>
191     </body>
192     </html>
193 {% endspaceless %}