<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>{{ config.SITE_NAME }}</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="description" content="">
  <meta name="author" content="">

  {%- assets "css" %}
    <link href="{{ ASSET_URL }}" rel="stylesheet" />
  {%- endassets %}

  {%- block css %}{%- endblock %}

  <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
  <!--[if lt IE 9]>
  <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
  <![endif]-->

  <!-- Le fav and touch icons -->
  <link rel="shortcut icon" type="image/png" href="{{ url_for('abilian_static', filename='img/logo-abilian-32x32.png') }}" />
  <link rel="apple-touch-icon" type="image/png" href="{{ url_for('abilian_static', filename='img/logo-abilian.png') }}" />

  {%- assets "js-top" %}
  <script type="text/javascript" src="{{ ASSET_URL }}"></script>
  {%- endassets %}

  {%- block top_js %}{%- endblock %}
</head>

<body>
{%- block body %}
  {#- accessibility link: see http://getbootstrap.com/getting-started/#accessibility #}
  <a href="#content" class="sr-only">{{ _("Skip to content") }}</a>

  <!-- navbar -->
  {% include "navbar.html" %}
  
  <div id="content" class="container clearfix">

    <!-- breadcrumbs -->
    <div class="row">
    {% include "breadcrumbs.html" %}
    </div>

    <!-- flash messages -->
    <div class="row" id="flash-messages">
      {%- include "flash-messages.html" %}
    </div>

    <div class="row">
      <header>
        {% block header %}
        {%- endblock %}
      </header>
    </div>

    <div class="row">
      {% block main %}
        {% block content %}
        {% endblock %}
      {%- endblock %}   
    </div>     
  </div>

  <footer>
    <div class="container">
      <div class="row">
        <div class="col-xs-12">
          <hr />
          <p class="text-right"><small>Powered by <a href="http://www.abilian.com/">Abilian</a></small></p>
        </div>
      </div>
    </div>
  </footer>
{%- endblock %}

{%- assets "js" %}
<script type="text/javascript" src="{{ ASSET_URL }}"></script>
{%- endassets %}  

{%- block js %}{%- endblock %} {# this block should be used to load additional libraries #}

<script type="text/javascript">
 {%- include "abilian_init.js" %}
</script>

{# 'abilian_init.js' will load additional libraries by writing new 'script'
   tags.  We put deferred JS and inline_js in a separate script tag so that the
   code is executed after thoses libraries have been loaded.
#}

<script type="text/javascript">
 {% deferredJS %}{% enddeferredJS %}

 {%- if inline_js %}
   {{ inline_js }}
 {%- endif %}
</script>

</body>
</html>
