{% load i18n static %}

{% if request.user.is_authenticated %}
  <a href="/ludzie/polka/"><i class="icon icon-liked"></i></a>
  <div id="user-menu">
    <ul>
      <li>
        <a href="{% url 'user_settings' %}" tabindex="-1">
          <strong>
            {{ request.user.username }}
          </strong>
        </a>
      </li>
      {% if request.user.is_staff %}
        <li><a href="{% url 'admin:index' %}" tabindex="-1">{% trans "Administracja" %}</a></li>
        <li><a class='edit-links-toggle' href="#" tabindex="-1">{% trans "Edytuj" %}</a></li>
      {% endif %}
      {% if request.user.membership %}
        <li><a href="{% url 'club_join' %}">{% trans "Wspierasz Wolne Lektury, dziękujemy!" %}</a></li>
      {% endif %}

      <li><a href="{% url 'logout' %}?next={% block logout %}{{ request.get_full_path }}{% endblock %}" tabindex="-1">{% trans "Wyloguj się" %}</a></li>
    </ul>
  </div>
  <a href="{% url 'user_settings' %}" class="user">
    {% if request.user.is_staff %}
      <img src="{% static '2022/images/icons/user-staff.svg' %}">
    {% elif request.user.membership %}
      <img src="{% static '2022/images/icons/user-vip.svg' %}">
    {% else %}
      <img src="{% static '2022/images/icons/user.svg' %}">
    {% endif %}
 </a>
{% else %}
  <div class="l-navigation__login">
    <a id="login-link" href='{% url 'login' %}?next={{ request.path }}'>{% trans "Zaloguj się" %}</a>
    /
    <a href='{% url 'register' %}?next={{ request.path }}'>{% trans "Załóż konto" %}</a>
  </div>
{% endif %}

<a href="/pomagam/?pk_campaign=menubar" class="menubar-donate">Wspieram!</a>

