Experiments page.
[wolnelektury.git] / src / wolnelektury / templates / 2022 / header.html
1 {% load cache %}
2 {% load static %}
3 {% load menu %}
4 {% load latest_blog_posts from blog %}
5 {% load preview_ad from catalogue_tags %}
6
7 <nav class="l-navigation">
8   <div class="l-container">
9     <a href="/" class="l-navigation__logo">
10       <img src="{% static "2022/images/logo.svg" %}" alt="WolneLektury.pl">
11     </a>
12     <div class="l-naviagion__search">
13       <form action="/szukaj/">
14         <input id="search" name="q" type="text" placeholder="szukaj tytułu, autora, motywów…" autocomplete="off" data-source="/szukaj/hint/?max=10">
15       </form>
16     </div>
17     <div class="l-navigation__actions">
18       {% if request.user.is_authenticated %}
19         <a href="/ludzie/polka/"><i class="icon icon-liked"></i></a>
20         <div id="user-menu">
21           <ul>
22             <li>
23               <a href="{% url 'user_settings' %}" tabindex="-1">
24                 <strong>
25                   {{ request.user.username }}
26                 </strong>
27               </a>
28             </li>
29             {% if request.user.is_staff %}
30               <li><a href="{% url 'admin:index' %}" tabindex="-1">Administracja</a></li>
31               <li><a class='edit-links-toggle' href="#" tabindex="-1">Edycja</a></li>
32             {% endif %}
33             <li><a href="{% url 'logout' %}?next={% block logout %}{{ request.get_full_path }}{% endblock %}" tabindex="-1">Wyloguj się</a></li>
34           </ul>
35         </div>
36         <a href="{% url 'user_settings' %}" class="user">
37           {% if request.user.is_staff %}
38             <img src="{% static '2022/images/icons/user-staff.svg' %}">
39           {% elif request.user %}
40             <img src="{% static '2022/images/icons/user-vip.svg' %}">
41           {% else %}
42             <img src="{% static '2022/images/icons/user.svg' %}">
43           {% endif %}
44         </a>
45       {% else %}
46         <div class="l-navigation__login">
47           <a href='{% url 'login' %}?next={{ request.path }}'>Zaloguj się</a>
48           /
49           <a href='{% url 'register' %}?next={{ request.path }}'>Załóż konto</a>
50         </div>
51       {% endif %}
52       <button class="l-navigation__button js-menu" aria-label="Menu">
53         <span class="c-hamburger">
54           <span class="bar"></span>
55         </span>
56       </button>
57     </div>
58     <div class="l-navigation__menu">
59       <div class="scrollable">
60         <div class="l-container">
61           <div class="l-navigation__menu__links">
62             {% cache 30 menu LANGUAGE_CODE %}
63               <ul>
64                 <li><strong>Katalog</strong></li>
65                 {% menu 'Katalog' %}
66               </ul>
67               <ul>
68                 <li><strong>Włącz się</strong></li>
69                 {% menu 'Włącz się' %}
70               </ul>
71               <ul>
72                 <li><strong>Aktualności</strong></li>
73                 {% latest_blog_posts %}
74                 {% menu 'Aktualności' %}
75               </ul>
76               <ul>
77                 <li><strong>Narzędzia</strong></li>
78                 {% menu 'Narzędzia' %}
79               </ul>
80               <ul>
81                 <li><strong>O nas</strong></li>
82                 {% menu 'O nas' %}
83               </ul>
84             {% endcache %}
85           </div>
86
87           <div class="l-navigation__menu__info">
88
89             <div class="l-navigation__menu__book">
90               {% preview_ad %}
91             </div>
92
93             <div class="l-navigation__menu__social">
94               <ul>
95                 <li>
96                   <a href="https://www.facebook.com/wolnelektury/"
97                      title="Facebook" tabindex="-1" target="_blank">
98                     <i class="icon icon-fb" aria-hidden="true"></i>
99                   </a>
100                 </li>
101                 <li>
102                   <a href="https://www.youtube.com/c/WolneLekturyYT/"
103                      title="YouTube" tabindex="-1" target="_blank">
104                     <i class="icon icon-yt" aria-hidden="true"></i>
105                   </a>
106                 </li>
107                 <li>
108                   <a href="https://www.instagram.com/wolnelektury/"
109                      title="Instagram" tabindex="-1" target="_blank">
110                     <i class="icon icon-ig" aria-hidden="true"></i>
111                   </a>
112                 </li>
113                 <li>
114                   <a href="https://twitter.com/wolnelektury"
115                      title="Twitter" tabindex="-1" target="_blank">
116                     <i class="icon icon-tt" aria-hidden="true"></i>
117                   </a>
118               </li>
119             </ul>
120           </div>
121         </div>
122         </div>
123       </div>
124     </div>
125   </div>
126 </nav>
127
128 {% block under-menu %}{% endblock %}