{% extends 'base.html' %}

{% block title %}<title>Entries | BrandX</title>{% endblock title %}

{% block content %}
    <hstack>
        <h1 stretch>Entries</h1>
        {% if user.is_authenticated %}
            <spacer></spacer>
            <button hx-get="{% url 'entries:add_entry' %}" hx-target="body">Add entry</button>
        {% endif %}
    </hstack>
    <main>
        {% if page_obj %}
            {% include './entry_next.html' %}
        {% else %}
            No entries published yet.
            {% if not user.is_authenticated %}<a href="/admin">Login</a> to add.{% endif %}
        {% endif %}
    </main>
{% endblock content %}
