08d60a32a40d50a1d1e969a6f3dd8141618c1386
[wolnelektury.git] / apps / wolnelektury_core / 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.png{% 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="header-wrapper">
40         <header id="main">
41             <a href="/" id="logo">
42                 <img src="{% static 'img/logo-neon.png' %}" alt="Wolne Lektury" />
43             </a>
44
45             <p id="user-info">
46                 {% user_username as user_username %}
47                 {% user_is_staff as user_is_staff %}
48                 {{ user_username.if }}{% trans "Welcome" %}, <span class="hidden-box-wrapper">
49                         <a href="{% url 'user_settings' %}" class="hidden-box-trigger">
50                             <strong>{{ user_username }}</strong>
51                         </a>
52                         <span id="user-menu" class="hidden-box">
53                             <a href="{% url 'account_set_password' %}">{% trans "Password" %}</a><br/>
54                             <a href="{% url 'account_email' %}">{% trans "E-mail" %}</a><br/>
55                             <a href="{% url 'socialaccount_connections' %}">{% trans "Social accounts" %}</a><br/>
56                         </span>
57                     </span> | <a href="{% url 'social_my_shelf' %}" id="user-shelves-link">{% trans "My shelf" %}</a>
58                 {{ user_username.endif }}
59                 {{ user_is_staff.if }} | <a href="/admin/">{% trans "Administration" %}</a>
60                 {{ user_is_staff.endif }}
61                 {{ user_username.if }} | <a href="{% url 'logout' %}?next={% block logout %}{{ request.get_full_path }}{% endblock %}">{% trans "Logout" %}</a>
62                 {{ user_username.else }}
63                     <a href="{% url 'login' %}?next={{ request.path }}" id="login" class="ajaxable">{% trans "Sign in" %}</a> / <a href="{% url 'register' %}?next={{ request.path }}" id="register" class="ajaxable">{% trans "Register" %}</a>
64                 {{ user_username.endif }}
65             </p>
66
67             <p id="tagline">
68                     {% url 'book_list' as b %}
69                     {% url 'infopage' 'prawa' as r %}
70                         {% count_books book_count %}
71                     {% blocktrans count book_count as c %}
72                     <a href='{{b}}'>{{c}}</a> free reading you have <a href='{{r}}'>right to</a>
73                     {% plural %}
74                     <a href='{{b}}'>{{c}}</a> free readings you have <a href='{{r}}'>right to</a>
75                     {% endblocktrans %}
76             </p>
77
78             <form id="search-area" action="{% url 'search' %}">
79                 <div id="search-field">
80                     <label for="search">{{search_form.q.label}}</label>
81                         {{search_form.q}}
82                 </div><button type='submit'>{% trans "Search" %}</button>
83             </form>
84
85         </header>
86         </div>
87
88
89         <nav id="nav-line">
90             {% catalogue_menu %}
91
92             <div id="lang-menu" class="hoverget">
93                 <span id='lang-button' class='hoverclick'>
94                     <span class="lang-flag">⚐</span>
95                     <span class="label"> {% trans "Language versions" %}</span>
96                 </span>
97                 <div id="lang-menu-items">
98                 {% for lang in LANGUAGES %}
99                     <form action="{% url 'django.views.i18n.set_language' %}" method="post">
100                     {% ssi_csrf_token %}
101                     <input type="hidden" name="language" value="{{ lang.0 }}" />
102                     <button type="submit" lang="{{ lang.0 }}" class="{% ifequal lang.0 LANGUAGE_CODE %}active{% endifequal %}">{{ lang.1 }}</button>
103                     </form>
104                 {% endfor %}
105                 </div>
106             </div>
107
108             <div class="clearboth"></div>
109         </nav>
110
111
112         <div id="main-content">
113             {% block body %}
114             {% endblock %}
115             <div class="clearboth"></div>
116         </div>
117
118
119         <div id="footer-wrapper">
120         <footer id="main">
121             {% ssi_include 'chunk' key='footer' %}
122             {% block add_footer %}{% endblock %}
123             {% ssi_include 'sponsor_page' name='footer' %}
124         </footer>
125         </div>
126
127
128
129         {# template #}
130         <div id="ajaxable-window" class='dialog-window'>
131             <div class="header"><a href="#" class="jqmClose">{% trans "Close" %}</a></div>
132             <div class="target">
133                 <p><img src="{% static "img/indicator.gif" %}" alt="*"/> {% trans "Loading" %}</p>
134             </div>
135         </div>
136
137
138         {% endblock bodycontent %}
139
140
141         <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
142         <script type="text/javascript">var LANGUAGE_CODE="{{ LANGUAGE_CODE }}"; var STATIC_URL="{{ STATIC_URL }}";</script>
143         {% javascript "base" %}
144
145         {% tracking_code %}
146
147                 {% block extrabody %}
148                 {% endblock %}
149
150         <script src="{% static "js/contrib/modernizr.custom.19652.js" %}"></script>
151     </body>
152 </html>
153 {% endspaceless %}