{% extends 'base.html' %}
{% from 'bootstrap/pagination.html' import render_pagination %}
{% from 'macros.html' import user_card with context %}

{% block title %}收藏者{% endblock %}

{% block content %}
    <div class="page-header">
        <div class="row">
            <div class="col-md-12">
                <a class="btn btn-default btn-sm" href="{{ url_for('main.show_photo', photo_id=photo.id) }}">
                    <span class="oi oi-arrow-left" aria-hidden="true"></span> 返回
                </a>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-12">
            <h3>{{ photo.collectors|length }} 收藏者</h3>
            {% for collect in collects %}
                {{ user_card(user=collect.collector) }}
            {% endfor %}
        </div>
    </div>
    {% if collects %}
        <div class="page-footer">
            {{ render_pagination(pagination, align='center') }}
        </div>
    {% endif %}
{% endblock %}
