Move checking membership to Membership.
[wolnelektury.git] / src / wolnelektury / templates / base / app.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     {% load cache %}
11     {% get_current_language as LANGUAGE_CODE %}
12     <head>
13       <meta charset="utf-8">
14       <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
15       <meta name="application-name" content="Wolne Lektury" />
16       <meta property="og:site_name" content="Wolne Lektury" />
17       <meta property="og:title" content="{% block ogtitle %}{{ page_title }}{% endblock %}" />
18       <meta property="og:type" content="{% block ogtype %}website{% endblock %}" />
19       <meta property="og:image" content="{% block ogimage %}{{ FULL_STATIC_URL }}img/wiatrak.jpg{% endblock %}" />
20       <meta name="description" content="{% block metadescription %}Darmowe, opracowane, pełne teksty lektur, e-booki, audiobooki i pliki DAISY na wolnej licencji.{% endblock %}" />
21       {% block ogextra %}{% endblock %}
22
23       <title>
24         {% block title %}{% block titleextra %}{{ page_title }}{% endblock %} :: {% trans "Wolne Lektury" %}{% endblock %}
25       </title>
26       <link rel="icon" href="{% static 'img/favicon.png' %}" type="image/png"/>
27       <link rel="search" type="application/opensearchdescription+xml" title="Wolne Lektury"
28             href="{% static 'opensearch.xml' %}"/>
29       <link rel="manifest" href="/manifest.json">
30       {% stylesheet "main" %}
31       {% block extrahead %}{% endblock %}
32     </head>
33     <body id="{% block bodyid %}base{% endblock %}">
34
35       {% block bodycontent %}
36
37         <div id="whole-header">
38           <div id="header-wrapper">
39             <header id="main">
40               <a href="/" id="logo">
41                 <img src="{% static 'img/logo-neon.png' %}" alt="Wolne Lektury"/>
42               </a>
43
44               <div id="lang-menu" class="hoverget">
45                 <span id='lang-button' class='hoverclick'>
46                   <span class="lang-flag">⚐</span>
47                   <span class="label"> {% trans "Language" %}</span>
48                 </span>
49                 <div id="lang-menu-items">
50                   {% for lang in LANGUAGES %}
51                     <form action="{% url 'set_language' %}" method="post">
52                       {% ssi_csrf_token %}
53                       <input type="hidden" name="language" value="{{ lang.0 }}"/>
54                       <button type="submit" lang="{{ lang.0 }}"
55                               class="{% ifequal lang.0 LANGUAGE_CODE %}active{% endifequal %}">{{ lang.1 }}</button>
56                     </form>
57                   {% endfor %}
58                 </div>
59               </div>
60
61               <nav id="menu">
62                 <ul id="user-info">
63                   {% user_username as user_username %}
64                   {% user_is_staff as user_is_staff %}
65                   {{ user_username.if }}
66                     <li>
67                       <a href="{% url 'user_settings' %}">
68                         <strong>{{ user_username }}</strong>
69                       </a>
70                     </li>
71                   {{ user_username.endif }}
72                   {{ user_username.if }}
73                     <li>
74                       <a href="{% url 'logout' %}?next={% block logout %}{{ request.get_full_path }}{% endblock %}">{% trans "Logout" %}</a>
75                     </li>
76                   {{ user_username.endif }}
77                 </ul>
78
79               </nav>
80             </header>
81           </div>
82         </div>
83
84         <div id="main-content">
85           {% block body %}
86           {% endblock %}
87           <div class="clearboth"></div>
88         </div>
89
90       {% endblock bodycontent %}
91
92       <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
93       <script type="text/javascript">
94         var LANGUAGE_CODE = "{{ LANGUAGE_CODE }}";
95         var STATIC_URL = "{{ STATIC_URL }}";
96       </script>
97       {% javascript "base" %}
98
99       {% tracking_code %}
100
101       {% block extrabody %}{% endblock %}
102
103       <script src="{% static "js/contrib/modernizr.custom.19652.js" %}"></script>
104     </body>
105   </html>
106 {% endspaceless %}