{% extends "pgallery/base.html" %}
{% load i18n %}
{% load pgallery_tags %}

{% block base-content %}
    <div class="col-lg-9">
        {% block content %}{% endblock %}
    </div>
    <div class="col-lg-3">
        <section class="recent-galleries">
            <h2>{% trans 'Recent galleries' %}</h2>
            <ul>
                {% get_recent_galleries 10 as recent_galleries %}
                {% for gallery in recent_galleries %}
                    <li><a href="{{ gallery.get_absolute_url }}">{{ gallery.title }}</a></li>
                {% endfor %}
            </ul>
        </section>
        <section class="archive">
            <h2>{% trans "Archive" %}</h2>
            <ul>
                {% get_gallery_archive_dates as dates %}
                {% for date in dates %}
                    <li><a href="{% url 'pgallery:month_archive' year=date.year month=date.month %}">{{ date|date:"F Y" }}</a></li>
                {% endfor %}
            </ul>
        </section>
        <section class="popular-tags">
            <h2>{% trans "Popular tags" %}</h2>
            <ul>
                {% get_popular_tags as tags %}
                {% for tag in tags %}
                    <li><a href="{% url 'pgallery:tagged_photo_list' tag=tag.tag %}" rel="tag">{{ tag.tag }}</a></li>
                {% endfor %}
            </ul>
        </section>
    </div>
{% endblock %}

