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