{% extends "site_base.html" %}
{% load thumbnail %}
{% load more %}

{% block breadcrumbs %}
{% endblock %}

{% block content %}
<ul class="fotos thumbnails">
    {% for image in photos %}
        <!-- Image -->
          <li class="span2">
            {% if image.width > 750 and image.height > 750 %}
                {% thumbnail image "750x750" as big %}
                <a href="{{ big.url }}">
                    {% thumbnail image "200x200" crop="top" as im %}<img src="{{ im.url }}" alt="{{ image }}" />{% endthumbnail %}
                    <div>{{ image.capture_date }}</div>
                </a>
                {% endthumbnail %}
            {% else %}
                <a href="{{ MEDIA_URL }}{{ image }}">
                    {% thumbnail image "200x200" crop="top" as im %}<img src="{{ im.url }}" alt="{{ image }}" />{% endthumbnail %}
                    <div>{{ image.capture_date }}</div>
                </a>
            {% endif %}
          </li>
        <!-- Image -->
    {% endfor %}
</ul>

{% if is_paginated %}
    <div class="pagination">
        <ul>
            {% if page_obj.has_previous %}
                <li><a href="{% url peques-galeria-page page_obj.previous_page_number %}">previous</a></li>
            {% endif %}
            <li class="active"><a href="">Page {{ page_obj.number }} of {{ page_obj.paginator.num_pages }}.</a></li>
            {% if page_obj.has_next %}
                <li><a href="{% url peques-galeria-page page_obj.next_page_number %}">next</a></li>
            {% endif %}
        </ul>
    </div>
{% endif %}

{% endblock %}
