{% extends "Base.html" %}
{% load staticfiles %}
{% load url from future %}

{% block title %}{% block head_title_base %}{% if SITE_NAME %}{{ SITE_NAME }} | {% endif %}{% block head_title %}{% endblock %}{% endblock %}{% endblock %}
    
{% block bodyClass %}class="{% block body_class %}{% endblock %}" id="{% block body_id %}{% endblock %}"{% endblock %}
    
{% block head %}
    {% block viewport %}
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
    {% endblock %}

    {% block style_base %}
        <link href="{% static "pinax/css/theme.css" %}" rel="stylesheet">
        <link href="{% static "bootstrap/css/bootstrap.css" %}" rel="stylesheet">
        <link href="{% static "font-awesome/css/font-awesome.css" %}" rel="stylesheet">
        {% block extra_style %}{% endblock %}
    {% endblock %}

    {% block html5shim %}
        <!-- HTML5 shim, for IE6-8 support of HTML elements -->
        <!--[if lt IE 9]>
            <script src="{% static "pinax/js/html5shiv.js" %}"></script>
        <![endif]-->
    {% endblock %}

    {% block extra_head_base %}
        {% block extra_head %}{% endblock %}
    {% endblock %}
    
{% endblock %}

{% block content %}
    <div class="{% block wrapper_class %}{% endblock %}">

        {% block topbar_base %}
            <header>
                <div class="navbar navbar-default {% block navbar_class %}navbar-fixed-top{% endblock %}">
                    <div class="container">
                    {% block topbar %}
                        <div class="navbar-header">
                            <button class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                                <span class="fa fa-bars"></span>
                            </button>
                            {% block site_brand %}<a class="navbar-brand" href="{% url "home" %}">{{ SITE_NAME }}</a>{% endblock %}
                        </div>
                        <div class="collapse navbar-collapse navbar-responsive-collapse">
                            {% block nav %}
                                {% comment %}
                                    <ul class="nav navbar-nav">
                                        <li><a href="#tab_one">One</a></li>
                                        <li><a href="#tab_two">Two</a></li>
                                    </ul>
                                {% endcomment %}
                            {% endblock %}
                            {% block account_bar %}{% include "_account_bar.html" %}{% endblock %}
                        </div>
                    {% endblock %}
                    </div>
                </div>
            </header>
        {% endblock %}

        {% block body_base %}
            <section id="content_body">
                <div class="container">
                    {% include "_messages.html" %}
                    {% block body %}
                    {% endblock %}
                </div>
            </section>
        {% endblock %}

        {% block footer_base %}
            <hr />
            <footer>
                <div class="container">
                    {% block footer %}{% endblock %}
                </div>
            </footer>
        {% endblock %}
    </div>

    {% block script_base %}
        <script src="{% block jquery_src %}{% static "jquery/js/jquery-2.1.3.min.js" %}{% endblock %}"></script>
        <script src="{% static "js/bootstrap.min.js" %}"></script>
        <script src="{% static "pinax/js/theme.js" %}"></script>
        {% block extra_script %}{% endblock %}
    {% endblock %}

    {% block extra_body_base %}
        {% block extra_body %}{% endblock %}
    {% endblock %}
{% endblock %}
