{% import "/cards/macros/note/factory.html.twig" as NoteFactory %}

{# Backwards compatibility with hAtom 0.1 #}
{% if pinned_notes is not empty %}
    <main class="feed pinned" tabindex="0" role="feed">
        <h1>Pinned Notes</h1>
        <div class="h-feed hfeed notes">
            {% for conversation in pinned_notes %}
                {% block current_note %}
                    {% if conversation is instanceof('array') %}
                        {% set args = conversation | merge({ 'type': 'vanilla_full', 'extra': { 'depth': 0 }}) %}
                        {{ NoteFactory.constructor(args) }}
                    {% else %}
                        {{ noteView.note_vanilla(conversation) }}
                    {% endif %}
                    <hr tabindex="0" title="{% trans %}End of note and replies{% endtrans %}">
                {% endblock current_note %}
            {% endfor %}
        </div>
    </main>
{% endif %}
