{% extends "base.html" %}
{% load compress %}
{% load promotion_tags %}

{% block layout %}
    {# Top-horizontal bar with account, notifictions, dashboard links #}
    {% include "partials/nav_accounts.html" %}

    {# Site logo/title, mini-basket, browse dropdown and searchbox #}
    <header class="header container-fluid">
        <div class="page_inner">
            <div class="row-fluid">
                {% include "partials/brand.html" %}
                {# Mini-basket wrapped in a block so some templates can now display it #}
                {% block mini_basket %}{% include "partials/mini_basket.html" %}{% endblock %}
            </div>
        </div>
        {% block navigation %}
            {% include "partials/nav_primary.html" %}
        {% endblock %}
    </header>

    {# Main content of page - other layout templates may override this block #}
    {% block content_wrapper %}
        <div class="container-fluid page">
            <div class="page_inner">
                {% block breadcrumbs %}{% endblock %}
                {% block header %}
                    <div class="page-header action">
                        <h1>{% block headertext %}{% endblock %}</h1>
                    </div>
                {% endblock %}
                {% include "partials/alert_messages.html" %}
                {% block subnavigation %}{% endblock %}
                <div class="content">
                    {% block subheader %}{% endblock subheader %}

                    {# Render promotions #}
                    <div id="promotions">
                        {% for promotion in promotions_page %}
                            {% render_promotion promotion %}
                        {% endfor %}
                    </div>

                    {# Div exists for AJAX updates to entire content section #}
                    <div id="content_inner">{% block content %}{% endblock %}</div>
                </div>
            </div>
        </div>
    {% endblock %}

    {% include "partials/footer.html" %}
{% endblock %}

{% block extrascripts %}
    {% include "partials/extrascripts.html" %}
    {{ block.super }}
{% endblock %}
