{% extends 'feed/layout.html' %}
{% load feed_page_tags %}
{% load i18n %}

{% block opengraph %}
    {% firstof status.book status.mention_books.first as book %}
    {% if book %}
        {% include 'snippets/opengraph.html' with image=preview %}
    {% else %}
        {% include 'snippets/opengraph.html' %}
    {% endif %}
{% endblock %}


{% block panel %}
<header class="block">
    <a href="/#feed" class="button" data-back>
        <span class="icon icon-arrow-left" aria-hidden="true"></span>
        <span>{% trans "Back" %}</span>
    </a>
</header>

<div class="thread-parent is-relative block">
    <div class="thread">
        {% for parent in ancestors %}
        {% if parent.id %}
        <div class="block">
            {% include 'snippets/status/status.html' with status=parent|load_subclass %}
        </div>
        {% endif %}
        {% endfor %}
        <div class="is-main block">
            {% include 'snippets/status/status.html' with status=status main=True expand=True %}
        </div>

        {% for child in children %}
        <div class="block">
            {% include 'snippets/status/status.html' with status=child %}
        </div>
        {% endfor %}
    </div>
</div>

{% endblock %}
