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

{% block nameofchat %}Лиза{% endblock %}

{% block lastmassege %}
    {{ last_message if last_message else "Нет сообщений" }}
{% 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>
            {% endif %}

            {% if message.author_of_massage == 'liza' %}
            <div class="massage">
                <img src="{{ url_for('static', filename='images/avatars/Liza-avatar.jpg') }}" class="avatar-massage" alt="Лиза">
                <div class="message-content">
                    <p class="massage-text">{{ message.massage }}</p>
                </div>
            </div>
            {% endif %}
        {% endfor %}
    {% else %}
        <div class="no-messages">
            <p>Пока нет сообщений с Лизой</p>
        </div>
    {% endif %}
{% endblock %}