{% load staticfiles %}
{% load url from future %}
{% load waliki_tags %}
<!DOCTYPE html>
<html lang="{{ LANGUAGE_CODE }}">
    <head>


        <meta charset="utf-8">
        {% block viewport %}
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% endblock %}
        <title>{% block head_title_base %}{% if page %} {{ page.title }} | {% endif %}{{ SITE_NAME|default:'Waliki' }}{% endblock %}</title>

         {% block style_base %}
        <link rel="stylesheet" type="text/css" href="{% static 'css/bootstrap.min.css' %}">
        <link rel="stylesheet" type="text/css" href="{% static 'css/pygments.css'%}">
        <link rel="stylesheet" type="text/css" href="{% static 'css/noembed.css'%}">
        <link rel="stylesheet" type="text/css" href="{% static 'css/waliki.css'%}">
            {% block extra_style %}{% endblock %}
        {% endblock %}

        {% block html5shim %}
        <!-- HTML5 shim, for IE6-8 support of HTML elements -->
        <!--[if lt IE 9]>
        <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv.min.js"></script>
        <![endif]-->
        {% endblock %}

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

    </head>

    <body>
        {% block navbar %}
        <div class="navbar navbar-fixed-top navbar-default">
            <div class="container">
                <div class="container">
                    <div class="row">
                        <div class="col-sm-12 col-md-12"><div class="navbar-header"><a href="{% url 'waliki_home' %}" class="navbar-brand">{{ site_name|default:"Waliki" }}</a></div>
                            {% navbar_links %}
                        </div>
                    </div>
                </div>
            </div>
        </div>
        {% endblock %}
        <div class="container">
        {% block messages %}
            <div class="row">
                <div class="col-lg-offset-2 col-sm-8 col-md-8">
                    {% include "_messages.html" %}
                </div>
            </div>
        {% endblock messages %}

          {% block body %}
            <div class="row">

                <div class="col-lg-offset-1 col-sm-10 col-md-10">
                    <div class="page-header">
                    {% block header %}
                       <h1>{% block title %}{{ page.title }}{% endblock title %}</h1>
                    {% endblock header %}
                    </div>

               {% block content %}
               {% endblock content %}

                {% block extra_content %}{% endblock extra_content %}
                </div>
            </div>
          {% endblock body%}
        </div>


        <footer>
            {% block footer %}{% endblock %}
        </footer>

        {% block script_base %}
        <script type="text/javascript" src="{% static "js/jquery.min.js" %}"></script>
        <script type="text/javascript">
            function csrfSafeMethod(method) {
            // these HTTP methods do not require CSRF protection
                return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method));
            }
            $.ajaxSetup({
                beforeSend: function(xhr, settings) {
                    if (!csrfSafeMethod(settings.type) && !this.crossDomain) {
                        xhr.setRequestHeader("X-CSRFToken", '{{ csrf_token }}');
                    }
                }
            });

        </script>
        <script src="{% static 'js/bootstrap.min.js'%}"></script>
        <script src="{% static 'js/waliki_base.js'%}"></script>

        {% block extra_script %}{% endblock %}
        {% endblock %}

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

</body></html>