{% extends 'base.html' %}

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

{% block content %}
    <main class="container">
        <center>
            <h1>Your Tags</h1>
            {% if not user.is_authenticated %}
                <p>Login to see saved objects you've tagged.</p>
            {% endif %}
        </center>
        <ul class="list-group">
            {% for tag in tags %}
                <li class="list-group-item d-flex justify-content-between align-items-start">
                    <details>
                        <summary>
                            <a href="{% url 'bookmarks:filtered_objs' tag.name %}">{{tag.name}}</a>
                        </summary>
                        {% include './tagged_models.html' %}
                    </details>
                </li>
            {% empty %}
                <h3> No tags supplied. </h3>
            {% endfor %}
        </ul>
    </main>
{% endblock content %}
