12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
- <button type="button" id="sidebarCollapse" class="btn btn-outline-success my-2 my-sm-0 nonactive">
- <span>Боковое меню</span>
- </button>
- <a class="navbar-brand" href="{% url 'mainapp:index' %}">Наименование</a>
- <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse"
- aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
- <span class="navbar-toggler-icon"></span>
- </button>
- <div class="collapse navbar-collapse" id="navbarCollapse">
- <ul class="navbar-nav mr-auto">
- <li class="nav-item">
- <a class="nav-link" href="{% url 'mainapp:other' page='about' %}">О сайте</a>
- </li>
- <li class="nav-item">
- <a class="nav-link" href="{% url 'mainapp:other' page='contacts' %}">Контакты</a>
- </li>
- {% if user.is_authenticated %}
- <li class="nav-item dropdown">
- <a id="link-user-name" class="nav-link custom-nav-link" data-toggle="dropdown"
- href="#"
- aria-expanded="false">{{ user.username }}</a>
- <div class="dropdown-menu">
- <a class="dropdown-item" href="{% url 'mainapp:profile' %}">Мои статьи</a>
- <a class="dropdown-item" href="{% url 'mainapp:profile_change' %}">Изменить личные
- данные</a>
- <a class="dropdown-item" href="{% url 'mainapp:password_change' %}">Изменить пароль</a>
- {% if user.is_staff %}
- <div class="dropdown-divider"></div>
- <a class="dropdown-item" href="/admin" target="_blank">Админка</a>
- {% endif %}
- <div class="dropdown-divider"></div>
- <a class="dropdown-item" href="{% url 'mainapp:logout' %}">Выйти</a>
- <div class="dropdown-divider"></div>
- <a class="dropdown-item" href="{% url 'mainapp:profile_delete' %}">Удалить аккаунт</a>
- </div>
- </li>
- {% else %}
- <li class="nav-item"><a class="nav-link custom-nav-link"
- href="{% url 'mainapp:register' %}">Регистрация</a>
- </li>
- <li class="nav-item"><a class="nav-link custom-nav-link"
- href="{% url 'mainapp:login' %}">Вход</a>
- </li>
- {% endif %}
- </ul>
- </div>
- </nav>
|