<!DOCTYPE html>
<html lang="ru">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="csrf-token" content="{{ csrf_token }}">
    <title>{% block title %}Мой Django Проект{% endblock %}</title>
    {% load static %}
    <link rel="icon" type="image/svg+xml" href="{% static 'favicon.svg' %}">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css">

    <!-- Select2 CSS -->
    <link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" />
    <link href="https://cdn.jsdelivr.net/npm/select2-bootstrap-5-theme@1.3.0/dist/select2-bootstrap-5-theme.min.css" rel="stylesheet" />

    <!-- Quill.js CSS (WYSIWYG редактор) -->
    <link href="https://cdn.quilljs.com/1.3.6/quill.snow.css" rel="stylesheet" />

    <!-- Качество фото индикаторы -->
    <link rel="stylesheet" href="/static/css/quality_indicator.css">

    {% block extra_css %}{% endblock %}

    <style>
        body {
            background-color: #f8f9fa;
            padding-top: 56px; /* Add space for fixed navbar */
        }
        .form-container {
            max-width: 400px;
            margin: 50px auto;
            padding: 30px;
            background: white;
            border-radius: 10px;
            box-shadow: 0 0 20px rgba(0,0,0,0.1);
        }
    </style>
</head>
<body>
    <!-- Include the navbar component -->
    {% include 'navbar.html' %}

    <!-- Сообщения для залогиненных пользователей отображаются здесь -->
    {% if user.is_authenticated %}
        {% include 'components/messages.html' %}
    {% endif %}

    <div class="container">
        {% block content %}{% endblock %}
    </div>

    <!-- jQuery (required for Select2) -->
    <script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>

    <!-- Select2 JS -->
    <script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/i18n/ru.js"></script>

    <!-- Quill.js (WYSIWYG редактор) -->
    <script src="https://cdn.quilljs.com/1.3.6/quill.min.js"></script>

    <!-- Auth functionality -->
    <script src="{% static 'accounts/js/auth.js' %}"></script>

    {% block extra_js %}{% endblock %}
</body>
</html>