Fixing two recently introduced bugs.
[wolnelektury.git] / apps / wolnelektury_core / templates / superbase.html
1 <!DOCTYPE html>
2 <html lang="{{ LANGUAGE_CODE }}" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">
3         {% load cache compressed i18n %}
4         {% load static from staticfiles %}
5     {% load catalogue_tags funding_tags reporting_stats sponsor_tags %}
6     {% load chunks %}
7     {% load piwik_tags %}
8     <head>
9         <meta charset="utf-8">
10         <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
11         <meta name="application-name" content="Wolne Lektury" />
12         <meta property="og:site_name" content="Wolne Lektury" />
13         <meta property="og:title" content="{% block ogtitle %}{% endblock %}" />
14         <meta property="og:type" content="{% block ogtype %}website{% endblock %}" />
15         <meta property="og:image" content="{% block ogimage %}{{ FULL_STATIC_URL }}img/wiatrak.png{% endblock %}" />
16         <meta name="description" 
17             content="{% block metadescription %}Darmowe, opracowane, pełne teksty lektur, e-booki, audiobooki i pliki DAISY na wolnej licencji.{% endblock %}" />
18         {% block ogextra %}{% endblock %}
19         
20
21         <title>{% block title %}{% trans "Wolne Lektury" %} :: 
22             {% block titleextra %}{% endblock %}{% 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         {% compressed_css "main" %}
27         {% block extrahead %}
28         {% endblock %}
29     </head>
30     <body id="{% block bodyid %}base{% endblock %}">
31
32         {% block bodycontent %}
33         {% funding link=1 closeable=1 add_class="funding-top-header" %}
34         <div id="header-wrapper">
35         <header id="main">
36             <a href="/" id="logo">
37                 <img src="{% static 'img/logo-neon.png' %}"
38                     alt="Wolne Lektury" />
39             </a>
40
41             <p id="user-info">
42                 {% if user.is_authenticated %}
43                     {% trans "Welcome" %}, 
44                     <span class="hidden-box-wrapper">
45                         <a href="{% url 'user_settings' %}" class="hidden-box-trigger">
46                             <strong>{{ user.username }}</strong>
47                         </a>
48                         <span id="user-menu" class="hidden-box">
49                             <a href="{% url 'account_set_password' %}">{% trans "Password" %}</a><br/>
50                             <a href="{% url 'account_email' %}">{% trans "E-mail" %}</a><br/>
51                             <a href="{% url 'socialaccount_connections' %}">{% trans "Social accounts" %}</a><br/>
52                         </span>
53                     </span>
54                     | <a href="{% url 'social_my_shelf' %}" id="user-shelves-link">{% trans "My shelf" %}</a>
55                     {% if user.is_staff %}
56                     | <a href="/admin/">{% trans "Administration" %}</a>
57                     {% endif %}
58                     | <a href="{% url 'logout' %}?next={% block logout %}{{ request.get_full_path }}{% endblock %}">{% trans "Logout" %}</a>
59                 {% else %}
60                     <a href="{% url 'login' %}?next={{ request.path }}"
61                         id="login" class="ajaxable">
62                             {% trans "Sign in" %}</a>
63                     /
64                     <a href="{% url 'register' %}?next={{ request.path }}"
65                         id="register" class="ajaxable">
66                             {% trans "Register" %}</a>
67                 {% endif %}
68             </p>
69
70             <p id="tagline">
71                 {% cache 60 tagline LANGUAGE_CODE %}
72                     {% url 'book_list' as b %}
73                     {% url 'infopage' 'prawa' as r %}
74                         {% count_books book_count %}
75                     {% blocktrans count book_count as c %}
76                     <a href='{{b}}'>{{c}}</a> free reading you have <a href='{{r}}'>right to</a>
77                     {% plural %}
78                     <a href='{{b}}'>{{c}}</a> free readings you have <a href='{{r}}'>right to</a>
79                     {% endblocktrans %}
80                 {% endcache %}
81             </p>
82
83             <form id="search-area" action="{% url 'search' %}">
84                 <div id="search-field">
85                     <label for="search">{{search_form.q.label}}</label>
86                         {{search_form.q}}
87                 </div><button type='submit'>{% trans "Search" %}</button>
88             </form>
89
90         </header>
91         </div>
92
93
94         <nav id="nav-line">
95             {% catalogue_menu %}
96
97             <div id="lang-menu" class="hoverget">
98                 <span id='lang-button' class='hoverclick'>
99                     <span class="lang-flag">⚐</span>
100                     <span class="label">{% trans "Language versions" %}</span>
101                 </span>
102                 <div id="lang-menu-items">
103                 {% for lang in LANGUAGES %}
104                     <form action="{% url 'django.views.i18n.set_language' %}" method="post">
105                     {% csrf_token %}
106                     <input type="hidden" name="language" value="{{ lang.0 }}" />
107                     <button type="submit"
108                         lang="{{ lang.0 }}"
109                         class="{% ifequal lang.0 LANGUAGE_CODE %}active{% endifequal %}"
110                         >{{ lang.1 }}</button>
111                     </form>
112                 {% endfor %}
113                 </div>
114             </div>
115
116             <div class="clearboth"></div>
117         </nav>
118
119
120         <div id="main-content">
121             {% block body %}
122             {% endblock %}
123             <div class="clearboth"></div>
124         </div>
125
126
127         <div id="footer-wrapper">
128         <footer id="main">
129             {% chunk 'footer' %}
130             {% block add_footer %}{% endblock %}
131             {% sponsor_page "footer" %}
132         </footer>
133         </div>
134
135
136
137         {# template #}
138         <div id="ajaxable-window" class='dialog-window'>
139             <div class="header"><a href="#" class="jqmClose">{% trans "Close" %}</a></div>
140             <div class="target">
141                 <p><img src="{% static "img/indicator.gif" %}" alt="*"/> {% trans "Loading" %}</p>
142             </div>
143         </div>
144
145
146         {% endblock bodycontent %}
147
148
149         <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
150         <script type="text/javascript">
151             var LANGUAGE_CODE = "{{ LANGUAGE_CODE }}";
152             var STATIC_URL = "{{ STATIC_URL }}";
153         </script>
154         {% compressed_js "base" %}
155
156         {% tracking_code %}
157
158                 {% block extrabody %}
159                 {% endblock %}
160
161         <script src="{% static "js/contrib/modernizr.custom.19652.js" %}"></script>
162     </body>
163 </html>