basic.html 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. {% load bootstrap4 %}
  2. {% load static %}
  3. <!DOCTYPE html>
  4. <html>
  5. <head>
  6. <meta charset="UTF-8">
  7. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  8. <title>{% block title %}Главная{% endblock %} - Доска объявлений</title>
  9. <meta name="robots" content="noindex, nofollow"/>
  10. {% bootstrap_css %}
  11. <link rel="stylesheet" type="text/css" href="{% static 'main/style.css' %}">
  12. {% bootstrap_javascript jquery='slim' %}
  13. </head>
  14. <body class="container-fluid">
  15. <header class="mb-4">
  16. <h1 class="display-1 text-center">Объявления</h1>
  17. </header>
  18. <div class="row">
  19. <ul class="col nav justify-content-end border">
  20. <li class="nav-item"><a class="nav-link" href="{% url 'main:register' %}">Регистрация</a></li>
  21. {% if user.is_authenticated %}
  22. <li class="nav-item dropdown">
  23. <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">Личный кабинет</a>
  24. <div class="dropdown-menu dropdown-menu-right">
  25. <a class="dropdown-item" href="{% url 'main:profile' %}">Мои объявления</a>
  26. <a class="dropdown-item" href="{% url 'main:profile_change' %}">Изменить личные данные</a>
  27. <a class="dropdown-item" href="{% url 'main:password_change' %}">Изменить пароль</a>
  28. <div class="dropdown-divider"></div>
  29. <a class="dropdown-item" href="{% url 'main:logout' %}">Выйти</a>
  30. <div class="dropdown-divider"></div>
  31. <a class="dropdown-item" href="{% url 'main:profile_delete' %}">Удалить</a>
  32. </div>
  33. </li>
  34. {% else %}
  35. <li class="nav-item"><a class="nav-link" href="{% url 'main:login' %}">Вход</a></li>
  36. {% endif %}
  37. </ul>
  38. </div>
  39. <div class="row">
  40. <nav class="col-md-auto nav flex-column border">
  41. <a class="nav-link root" href="{% url 'main:index' %}">Главная</a>
  42. {% for rubric in rubrics %}
  43. {% ifchanged rubric.super_rubric.pk %}
  44. <span class="nav-link root font-weight-bold">{{ rubric.super_rubric.name }}</span>
  45. {% endifchanged %}
  46. <a class="nav-link" href="{% url 'main:by_rubric' pk=rubric.pk %}">{{ rubric.name }}</a>
  47. {% endfor %}
  48. <a class="nav-link root" href="{% url 'main:other' page='about' %}">О сайте</a>
  49. </nav>
  50. <section class="col border py-2">
  51. {% bootstrap_messages %}
  52. {% block content %}
  53. {% endblock %}
  54. </section>
  55. </div>
  56. <footer class="mt-3">
  57. <p class="text-right font-italic">&copy; 2023</p>
  58. </footer>
  59. </body>
  60. </html>