{% extends 'chats/base.html' %}

{% block nameofchat %}BardMakar{% endblock %}

{% block lastmassege %}Hello, maaaan!!!{% endblock %}

{% block messages %}
    {% if messages %}
        {% for message in messages %}
            {% if message.author_of_massage == 'me' %}
            <div class="massage massage-from-me">
                <div class="message-content">
                    <p class="massage-text">{{ message.massage }}</p>
                </div>
                <img src="{{ url_for('static', filename='images/avatars/me_avatar.jpg') }}" class="avatar-massage" alt="Я">
            </div>
            {% else %}
            <div class="massage">
                <img src="{{ url_for('static', filename='images/avatars/мем макар.jpg') }}" class="avatar-massage" alt="BardMakar">
                <div class="message-content">
                    <p class="massage-text">{{ message.massage }}</p>
                </div>
            </div>
            {% endif %}
        {% endfor %}
    {% else %}
        <div class="no-messages">
            <p>Пока нет сообщений с BardMakar</p>
        </div>
    {% endif %}
{% endblock %}