{% extends 'ditto/base.html' %}

{% block breadcrumbs %}
    <li class="breadcrumb-item"><a href="{% url 'ditto:home' %}">Home</a></li>
    <li class="breadcrumb-item active">{{ day|date:'j M Y' }}</li>
{% endblock %}

{% block content %}
    <h1 class="my-4">
        {% block title %}
            {{ day|date:'l, j F Y' }}
        {% endblock %}
    </h1>

    {% include 'ditto/includes/pager.html' with next=next_day previous=previous_day ditto_app_slug=ditto_app_slug ditto_variety_slug=ditto_variety_slug only %}

    <div class="row">
        <div class="col-md-3">
            {% include 'ditto/includes/variety_nav.html' with variety_counts=variety_counts ditto_app_name=ditto_app_name ditto_variety_name=ditto_variety_name day=day only %}
        </div> <!-- .col -->

        <div class="col-md-9">

            {% if object_list|length > 0 %}
                {% if date_field == 'taken_time' %}
                    {% include 'ditto/includes/item_lists.html' with view='day' order='taken' %}
                {% else %}
                    {% include 'ditto/includes/item_lists.html' with view='day' order='uploaded' %}
                {% endif %}


            {% else %}
                <p>
                    There are no
                    {% if ditto_app_name == 'flickr' %}
                        Flickr photos
                    {% elif ditto_app_name == 'lastfm' %}
                        Last.fm scrobbles
                    {% elif ditto_app_name == 'pinboard' %}
                        Pinboard bookmarks
                    {% elif ditto_app_name == 'twitter' %}
                        {% if ditto_variety_name == 'favorites' %}
                            Twitter likes
                        {% else %}
                            Tweets
                        {% endif %}
                    {% else %}
                        things
                    {% endif %}
                    to display for this day.
                </p>
            {% endif %}
        </div> <!-- .col -->
    </div> <!-- .row -->

    {% include 'ditto/includes/pager.html' with next=next_day previous=previous_day ditto_app_slug=ditto_app_slug ditto_variety_slug=ditto_variety_slug only %}


{% endblock content %}

