{% load i18n static theme_material_kit %}

<!-- Navbar Light -->
<nav class="navbar navbar-expand-lg navbar-light bg-white py-3">
  <div class="container">
    <a class="navbar-brand" href="/" rel="tooltip" title="Designed and Coded by Creative Tim" data-placement="bottom">
      Material Kit 2
    </a>
    <button class="navbar-toggler shadow-none ms-2" type="button" data-bs-toggle="collapse" data-bs-target="#navigation" aria-controls="navigation" aria-expanded="false" aria-label="Toggle navigation">
      <span class="navbar-toggler-icon mt-2">
        <span class="navbar-toggler-bar bar1"></span>
        <span class="navbar-toggler-bar bar2"></span>
        <span class="navbar-toggler-bar bar3"></span>
      </span>
    </button>
    <div class="collapse navbar-collapse w-100 pt-3 pb-2 py-lg-0 ms-lg-12 ps-lg-5" id="navigation">
      <ul class="navbar-nav navbar-nav-hover ms-auto">
        <li class="nav-item dropdown dropdown-hover mx-2 ms-lg-5">
          <a class="nav-link ps-2 d-flex justify-content-between cursor-pointer align-items-center" id="dropdownMenuPages5" data-bs-toggle="dropdown" aria-expanded="false">
            <i class="material-icons opacity-6 me-2 text-md">dashboard</i>
            Pages
            <img src="{% static 'img/down-arrow-dark.svg' %}" alt="down-arrow" class="arrow ms-auto ms-md-2">
          </a>
          <div class="dropdown-menu ms-n3 dropdown-menu-animation dropdown-md p-3 border-radius-lg mt-0 mt-lg-3" aria-labelledby="dropdownMenuPages5">
            <div class="d-none d-lg-block">
              <h6 class="dropdown-header text-dark font-weight-bolder d-flex align-items-center px-1">
                Landing Pages
              </h6>

              {% admin_get_menu as app_list %}
              {% if app_list %}
                  {% for app in app_list %}
                      {% if app.has_perms and not app.pinned %}
                          <a href="{{ app.url }}" class="dropdown-item border-radius-md" data-bs-toggle="collapse" data-bs-target="#collapse-{{app.app_label}}" >
                            <span>{{ app.label|slice:10 }}{% if app.label|length > 10 %}..{% endif %}</span>
                          </a>

                          {% if app.models %}
                            <div class="collapse" id="collapse-{{app.app_label}}">                                                                                                   
                              <ul class="flex-column nav">
                                {% for model in app.models %}
                                  {% if model.url %}
                                    <li class="nav-item{% if 'bootstrap-tables' in segment or model.url in request.path|urlencode %} active {% endif %} list-unstyled">
                                      <a class="nav-link" href="{{ model.url }}">
                                        <span class="ms-5 text-dark">{{ model.label }}</span>
                                      </a>
                                    </li>
                                  {% else %}
                                    <li class="nav-item list-unstyled">{{ model.label }}</li>
                                  {% endif %}
                                {% endfor %}
                              </ul>
                            </div>
                          {% endif %}
                      {% endif %}
                  {% endfor %}
              {% endif %}
              {% if request.user.is_superuser %}
              <a href="{% url 'admin:index' %}" class="dropdown-item border-radius-md">
              {% else %}
                <a href="/" class="dropdown-item border-radius-md">
              {% endif %}
                <span>Presentation</span>
              </a>
              <a href="{% url 'about-us' %}" class="dropdown-item border-radius-md">
                <span>About Us</span>
              </a>
              <a href="{% url 'contact-us' %}" class="dropdown-item border-radius-md">
                <span>Contact Us</span>
              </a>
              <a href="{% url 'author' %}" class="dropdown-item border-radius-md">
                <span>Author</span>
              </a>
              <h6 class="dropdown-header text-dark font-weight-bolder d-flex align-items-center px-1 mt-3">
                Account
              </h6>

              {% if request.user.is_authenticated %}
                {% if request.user.is_superuser %}
                  <a href="{% url 'admin:password_change' %}" class="dropdown-item border-radius-md">
                    <span>Change Password</span>
                  </a>
                  <a href="{% url 'admin:logout' %}" class="dropdown-item border-radius-md">
                    <span>Logout</span>
                  </a>
                {% else %}
                  <a href="{% url 'password_change' %}" class="dropdown-item border-radius-md">
                    <span>Change Password</span>
                  </a>
                  <a href="{% url 'logout' %}" class="dropdown-item border-radius-md">
                    <span>Logout</span>
                  </a>
                {% endif %}
              {% else %}
              <a href="{% url 'login' %}" class="dropdown-item border-radius-md">
                <span>Sign In</span>
              </a>
              <a href="{% url 'register' %}" class="dropdown-item border-radius-md">
                <span>Sign Up</span>
              </a>
              {% endif %}
            </div>
            <div class="d-lg-none">
              <h6 class="dropdown-header text-dark font-weight-bolder d-flex align-items-center px-1">
                Landing Pages
              </h6>
              {% if request.user.is_superuser %}
              <a href="{% url 'admin:index' %}" class="dropdown-item border-radius-md">
              {% else %}
                <a href="/" class="dropdown-item border-radius-md">
              {% endif %}
                <span>Presentation</span>
              </a>
              <a href="{% url 'about-us' %}" class="dropdown-item border-radius-md">
                <span>About Us</span>
              </a>
              <a href="{% url 'contact-us' %}" class="dropdown-item border-radius-md">
                <span>Contact Us</span>
              </a>
              <a href="{% url 'author' %}" class="dropdown-item border-radius-md">
                <span>Author</span>
              </a>
              <h6 class="dropdown-header text-dark font-weight-bolder d-flex align-items-center px-1 mt-3">
                Account
              </h6>

              {% if request.user.is_authenticated %}
                {% if request.user.is_superuser %}
                  <a href="{% url 'admin:password_change' %}" class="dropdown-item border-radius-md">
                    <span>Change Password</span>
                  </a>
                  <a href="{% url 'admin:logout' %}" class="dropdown-item border-radius-md">
                    <span>Logout</span>
                  </a>
                {% else %}
                  <a href="{% url 'password_change' %}" class="dropdown-item border-radius-md">
                    <span>Change Password</span>
                  </a>
                  <a href="{% url 'logout' %}" class="dropdown-item border-radius-md">
                    <span>Logout</span>
                  </a>
                {% endif %}
              {% else %}
              <a href="{% url 'login' %}" class="dropdown-item border-radius-md">
                <span>Sign In</span>
              </a>
              <a href="{% url 'register' %}" class="dropdown-item border-radius-md">
                <span>Sign Up</span>
              </a>
              {% endif %}
            </div>
          </div>
        </li>
        <li class="nav-item dropdown dropdown-hover mx-2">
          <a class="nav-link ps-2 d-flex justify-content-between cursor-pointer align-items-center" id="dropdownMenuBlocks" data-bs-toggle="dropdown" aria-expanded="false">
            <i class="material-icons opacity-6 me-2 text-md">view_day</i>
            Sections
            <img src="{% static 'img/down-arrow-dark.svg' %}" alt="down-arrow" class="arrow ms-auto ms-md-2">
          </a>
          <ul class="dropdown-menu dropdown-menu-end dropdown-menu-animation dropdown-md dropdown-md-responsive p-3 border-radius-lg mt-0 mt-lg-3" aria-labelledby="dropdownMenuBlocks">
            <div class="d-none d-lg-block">
              <li class="nav-item dropdown dropdown-hover dropdown-subitem">
                <a class="dropdown-item py-2 ps-3 border-radius-md" href="{% url 'presentation' %}">
                  <div class="w-100 d-flex align-items-center justify-content-between">
                    <div>
                      <h6 class="dropdown-header text-dark font-weight-bolder d-flex justify-content-cente align-items-center p-0">Page Sections</h6>
                      <span class="text-sm">See all sections</span>
                    </div>
                    <img src="{% static 'img/down-arrow.svg' %}" alt="down-arrow" class="arrow">
                  </div>
                </a>
                <div class="dropdown-menu mt-0 py-3 px-2 mt-3">
                  <a class="dropdown-item ps-3 border-radius-md mb-1" href="{% url 'page_header' %}">
                    Page Headers
                  </a>
                  <a class="dropdown-item ps-3 border-radius-md mb-1" href="{% url 'features' %}">
                    Features
                  </a>
                </div>
              </li>
              <li class="nav-item dropdown dropdown-hover dropdown-subitem">
                <a class="dropdown-item py-2 ps-3 border-radius-md" href="{% url 'presentation' %}">
                  <div class="w-100 d-flex align-items-center justify-content-between">
                    <div>
                      <h6 class="dropdown-header text-dark font-weight-bolder d-flex justify-content-cente align-items-center p-0">Navigation</h6>
                      <span class="text-sm">See all navigations</span>
                    </div>
                    <img src="{% static 'img/down-arrow.svg' %}" alt="down-arrow" class="arrow">
                  </div>
                </a>
                <div class="dropdown-menu mt-0 py-3 px-2 mt-3">
                  <a class="dropdown-item ps-3 border-radius-md mb-1" href="{% url 'navbar' %}">
                    Navbars
                  </a>
                  <a class="dropdown-item ps-3 border-radius-md mb-1" href="{% url 'nav_tabs' %}">
                    Nav Tabs
                  </a>
                  <a class="dropdown-item ps-3 border-radius-md mb-1" href="{% url 'pagination' %}">
                    Pagination
                  </a>
                </div>
              </li>
              <li class="nav-item dropdown dropdown-hover dropdown-subitem">
                <a class="dropdown-item py-2 ps-3 border-radius-md" href="{% url 'presentation' %}">
                  <div class="w-100 d-flex align-items-center justify-content-between">
                    <div>
                      <h6 class="dropdown-header text-dark font-weight-bolder d-flex justify-content-cente align-items-center p-0">Input Areas</h6>
                      <span class="text-sm">See all input areas</span>
                    </div>
                    <img src="{% static 'img/down-arrow.svg' %}" alt="down-arrow" class="arrow">
                  </div>
                </a>
                <div class="dropdown-menu mt-0 py-3 px-2 mt-3">
                  <a class="dropdown-item ps-3 border-radius-md mb-1" href="{% url 'inputs' %}">
                    Inputs
                  </a>
                  <a class="dropdown-item ps-3 border-radius-md mb-1" href="{% url 'forms' %}">
                    Forms
                  </a>
                </div>
              </li>
              <li class="nav-item dropdown dropdown-hover dropdown-subitem">
                <a class="dropdown-item py-2 ps-3 border-radius-md" href="{% url 'presentation' %}">
                  <div class="w-100 d-flex align-items-center justify-content-between">
                    <div>
                      <h6 class="dropdown-header text-dark font-weight-bolder d-flex justify-content-cente align-items-center p-0">Attention Catchers</h6>
                      <span class="text-sm">See all examples</span>
                    </div>
                    <img src="{% static 'img/down-arrow.svg' %}" alt="down-arrow" class="arrow">
                  </div>
                </a>
                <div class="dropdown-menu mt-0 py-3 px-2 mt-3">
                  <a class="dropdown-item ps-3 border-radius-md mb-1" href="{% url 'alerts' %}">
                    Alerts
                  </a>
                  <a class="dropdown-item ps-3 border-radius-md mb-1" href="{% url 'modals' %}">
                    Modals
                  </a>
                  <a class="dropdown-item ps-3 border-radius-md mb-1" href="{% url 'tooltips' %}">
                    Tooltips & Popovers
                  </a>
                </div>
              </li>
              <li class="nav-item dropdown dropdown-hover dropdown-subitem">
                <a class="dropdown-item py-2 ps-3 border-radius-md" href="{% url 'presentation' %}">
                  <div class="w-100 d-flex align-items-center justify-content-between">
                    <div>
                      <h6 class="dropdown-header text-dark font-weight-bolder d-flex justify-content-cente align-items-center p-0">Elements</h6>
                      <span class="text-sm">See all elements</span>
                    </div>
                    <img src="{% static 'img/down-arrow.svg' %}" alt="down-arrow" class="arrow">
                  </div>
                </a>
                <div class="dropdown-menu mt-0 py-3 px-2 mt-3">
                  <a class="dropdown-item ps-3 border-radius-md mb-1" href="{% url 'avatars' %}">
                    Avatars
                  </a>
                  <a class="dropdown-item ps-3 border-radius-md mb-1" href="{% url 'badges' %}">
                    Badges
                  </a>
                  <a class="dropdown-item ps-3 border-radius-md mb-1" href="{% url 'breadcrumbs' %}">
                    Breadcrumbs
                  </a>
                  <a class="dropdown-item ps-3 border-radius-md mb-1" href="{% url 'buttons' %}">
                    Buttons
                  </a>
                  <a class="dropdown-item ps-3 border-radius-md mb-1" href="{% url 'dropdowns' %}">
                    Dropdowns
                  </a>
                  <a class="dropdown-item ps-3 border-radius-md mb-1" href="{% url 'progress_bars' %}">
                    Progress Bars
                  </a>
                  <a class="dropdown-item ps-3 border-radius-md mb-1" href="{% url 'toggles' %}">
                    Toggles
                  </a>
                  <a class="dropdown-item ps-3 border-radius-md mb-1" href="{% url 'typography' %}">
                    Typography
                  </a>
                </div>
              </li>
            </div>
            <div class="row d-lg-none">
              <div class="col-md-12">
                <div class="d-flex mb-2">
                  <div class="icon h-10 me-3 d-flex mt-1">
                    <i class="ni ni-single-copy-04 text-gradient text-primary"></i>
                  </div>
                  <div class="w-100 d-flex align-items-center justify-content-between">
                    <div>
                      <h6 class="dropdown-header text-dark font-weight-bolder d-flex justify-content-cente align-items-center p-0">Page Sections</h6>
                    </div>
                  </div>
                </div>
                <a class="dropdown-item ps-3 border-radius-md mb-1" href="{% url 'page_header' %}">
                  Page Headers
                </a>
                <a class="dropdown-item ps-3 border-radius-md mb-1" href="{% url 'features' %}">
                  Features
                </a>
                <div class="d-flex mb-2 mt-3">
                  <div class="icon h-10 me-3 d-flex mt-1">
                    <i class="ni ni-laptop text-gradient text-primary"></i>
                  </div>
                  <div class="w-100 d-flex align-items-center justify-content-between">
                    <div>
                      <h6 class="dropdown-header text-dark font-weight-bolder d-flex justify-content-cente align-items-center p-0">Navigation</h6>
                    </div>
                  </div>
                </div>
                <a class="dropdown-item ps-3 border-radius-md mb-1" href="{% url 'navbar' %}">
                  Navbars
                </a>
                <a class="dropdown-item ps-3 border-radius-md mb-1" href="{% url 'nav_tabs' %}">
                  Nav Tabs
                </a>
                <a class="dropdown-item ps-3 border-radius-md mb-1" href="{% url 'pagination' %}">
                  Pagination
                </a>
                <div class="d-flex mb-2 mt-3">
                  <div class="icon h-10 me-3 d-flex mt-1">
                    <i class="ni ni-badge text-gradient text-primary"></i>
                  </div>
                  <div class="w-100 d-flex align-items-center justify-content-between">
                    <div>
                      <h6 class="dropdown-header text-dark font-weight-bolder d-flex justify-content-cente align-items-center p-0">Input Areas</h6>
                    </div>
                  </div>
                </div>
                <a class="dropdown-item ps-3 border-radius-md mb-1" href="{% url 'inputs' %}">
                  Inputs
                </a>
                <a class="dropdown-item ps-3 border-radius-md mb-1" href="{% url 'forms' %}">
                  Forms
                </a>
                <div class="d-flex mb-2 mt-3">
                  <div class="icon h-10 me-3 d-flex mt-1">
                    <i class="ni ni-notification-70 text-gradient text-primary"></i>
                  </div>
                  <div class="w-100 d-flex align-items-center justify-content-between">
                    <div>
                      <h6 class="dropdown-header text-dark font-weight-bolder d-flex justify-content-cente align-items-center p-0">Attention Catchers</h6>
                    </div>
                  </div>
                </div>
                <a class="dropdown-item ps-3 border-radius-md mb-1" href="{% url 'alerts' %}">
                  Alerts
                </a>
                <a class="dropdown-item ps-3 border-radius-md mb-1" href="{% url 'modals' %}">
                  Modals
                </a>
                <a class="dropdown-item ps-3 border-radius-md mb-1" href="{% url 'tooltips' %}">
                  Tooltips & Popovers
                </a>
                <div class="d-flex mb-2 mt-3">
                  <div class="icon h-10 me-3 d-flex mt-1">
                    <i class="ni ni-app text-gradient text-primary"></i>
                  </div>
                  <div class="w-100 d-flex align-items-center justify-content-between">
                    <div>
                      <h6 class="dropdown-header text-dark font-weight-bolder d-flex justify-content-cente align-items-center p-0">Elements</h6>
                    </div>
                  </div>
                </div>
                <a class="dropdown-item ps-3 border-radius-md mb-1" href="{% url 'avatars' %}">
                  Avatars
                </a>
                <a class="dropdown-item ps-3 border-radius-md mb-1" href="{% url 'badges' %}">
                  Badges
                </a>
                <a class="dropdown-item ps-3 border-radius-md mb-1" href="{% url 'breadcrumbs' %}">
                  Breadcrumbs
                </a>
                <a class="dropdown-item ps-3 border-radius-md mb-1" href="{% url 'buttons' %}">
                  Buttons
                </a>
                <a class="dropdown-item ps-3 border-radius-md mb-1" href="{% url 'dropdowns' %}">
                  Dropdowns
                </a>
                <a class="dropdown-item ps-3 border-radius-md mb-1" href="{% url 'progress_bars' %}">
                  Progress Bars
                </a>
                <a class="dropdown-item ps-3 border-radius-md mb-1" href="{% url 'toggles' %}">
                  Toggles
                </a>
                <a class="dropdown-item ps-3 border-radius-md mb-1" href="{% url 'typography' %}">
                  Typography
                </a>
              </div>
            </div>
          </ul>
        </li>
        <li class="nav-item dropdown dropdown-hover mx-2">
          <a class="nav-link ps-2 d-flex justify-content-between cursor-pointer align-items-center" id="dropdownMenuDocs" data-bs-toggle="dropdown" aria-expanded="false">
            <i class="material-icons opacity-6 me-2 text-md">article</i>
            Docs
            <img src="{% static 'img/down-arrow-dark.svg' %}" alt="down-arrow" class="arrow ms-auto ms-md-2">
          </a>
          <ul class="dropdown-menu dropdown-menu-end dropdown-menu-animation dropdown-md dropdown-md-responsive mt-0 mt-lg-3 p-3 border-radius-lg" aria-labelledby="dropdownMenuDocs">
            <div class="d-none d-lg-block">
              <ul class="list-group">
                <li class="nav-item list-group-item border-0 p-0">
                  <a class="dropdown-item py-2 ps-3 border-radius-md" href="https://www.creative-tim.com/learning-lab/bootstrap/overview/material-kit?AFFILIATE=128200">
                    <h6 class="dropdown-header text-dark font-weight-bolder d-flex justify-content-cente align-items-center p-0">Getting Started</h6>
                    <span class="text-sm">All about overview, quick start, license and contents</span>
                  </a>
                </li>
                <li class="nav-item list-group-item border-0 p-0">
                  <a class="dropdown-item py-2 ps-3 border-radius-md" href="https://www.creative-tim.com/learning-lab/bootstrap/colors/material-kit?AFFILIATE=128200">
                    <h6 class="dropdown-header text-dark font-weight-bolder d-flex justify-content-cente align-items-center p-0">Foundation</h6>
                    <span class="text-sm">See our colors, icons and typography</span>
                  </a>
                </li>
                <li class="nav-item list-group-item border-0 p-0">
                  <a class="dropdown-item py-2 ps-3 border-radius-md" href="https://www.creative-tim.com/learning-lab/bootstrap/alerts/material-kit?AFFILIATE=128200">
                    <h6 class="dropdown-header text-dark font-weight-bolder d-flex justify-content-cente align-items-center p-0">Components</h6>
                    <span class="text-sm">Explore our collection of fully designed components</span>
                  </a>
                </li>
                <li class="nav-item list-group-item border-0 p-0">
                  <a class="dropdown-item py-2 ps-3 border-radius-md" href="https://www.creative-tim.com/learning-lab/bootstrap/datepicker/material-kit?AFFILIATE=128200">
                    <h6 class="dropdown-header text-dark font-weight-bolder d-flex justify-content-cente align-items-center p-0">Plugins</h6>
                    <span class="text-sm">Check how you can integrate our plugins</span>
                  </a>
                </li>
                <li class="nav-item list-group-item border-0 p-0">
                  <a class="dropdown-item py-2 ps-3 border-radius-md" href="https://www.creative-tim.com/learning-lab/bootstrap/utilities/material-kit?AFFILIATE=128200">
                    <h6 class="dropdown-header text-dark font-weight-bolder d-flex justify-content-cente align-items-center p-0">Utility Classes</h6>
                    <span class="text-sm">For those who want flexibility, use our utility classes</span>
                  </a>
                </li>
              </ul>
            </div>
            <div class="row d-lg-none">
              <div class="col-md-12 g-0">
                <a class="dropdown-item py-2 ps-3 border-radius-md" href="{% url 'about-us' %}">
                  <h6 class="dropdown-header text-dark font-weight-bolder d-flex justify-content-cente align-items-center p-0">Getting Started</h6>
                  <span class="text-sm">All about overview, quick start, license and contents</span>
                </a>
                <a class="dropdown-item py-2 ps-3 border-radius-md" href="{% url 'about-us' %}">
                  <h6 class="dropdown-header text-dark font-weight-bolder d-flex justify-content-cente align-items-center p-0">Foundation</h6>
                  <span class="text-sm">See our colors, icons and typography</span>
                </a>
                <a class="dropdown-item py-2 ps-3 border-radius-md" href="{% url 'about-us' %}">
                  <h6 class="dropdown-header text-dark font-weight-bolder d-flex justify-content-cente align-items-center p-0">Components</h6>
                  <span class="text-sm">Explore our collection of fully designed components</span>
                </a>
                <a class="dropdown-item py-2 ps-3 border-radius-md" href="{% url 'about-us' %}">
                  <h6 class="dropdown-header text-dark font-weight-bolder d-flex justify-content-cente align-items-center p-0">Plugins</h6>
                  <span class="text-sm">Check how you can integrate our plugins</span>
                </a>
                <a class="dropdown-item py-2 ps-3 border-radius-md" href="{% url 'about-us' %}">
                  <h6 class="dropdown-header text-dark font-weight-bolder d-flex justify-content-cente align-items-center p-0">Utility Classes</h6>
                  <span class="text-sm">For those who want flexibility, use our utility classes</span>
                </a>
              </div>
            </div>
          </ul>
        </li>
        {% if request.user.is_authenticated %}
        <li class="nav-item ms-lg-auto">
          <a class="nav-link nav-link-icon me-2" href="{% url 'logout' %}">
            <i class="fa fa-sign-out me-1"></i>
            <p class="d-inline text-sm z-index-1 font-weight-bold" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Logout">Logout</p>
          </a>
        </li>
        {% else %}
        <li class="nav-item ms-lg-auto">
          <a class="nav-link nav-link-icon me-2" href="{% url 'login' %}">
            <i class="fa fa-sign-in me-1"></i>
            <p class="d-inline text-sm z-index-1 font-weight-bold" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Login">Login</p>
          </a>
        </li>
        {% endif %}
        <li class="nav-item my-auto ms-3 ms-lg-0">
          <a href="https://appseed.us/product/material-kit/django/" target="_blank"
             class="btn btn-sm  bg-gradient-primary  mb-0 me-1 mt-2 mt-md-0">Download</a>
        </li>
      </ul>
    </div>
  </div>
</nav>
<!-- End Navbar -->