{% import "menu" as menu with context %}

{% set script_files = script_files %}
{% set css_files = ['/theme/design.css', '/theme/pygmentize.css'] + css_files %}

<!doctype html>
<html>
  <head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>{{ title | cleantitle }}</title>
    <link rel="shortcut icon" href="/theme/favicon.ico" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '{{ url_root }}',
        VERSION:     '{{ release|e }}',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '{{ '' if no_search_suffix else file_suffix }}',
        HAS_SOURCE:  {{ has_source|lower }}
      };
    </script>
    {%- for scriptfile in script_files %}
    <script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
    {%- endfor %}
    {%- for cssfile in css_files %}
    <link rel="stylesheet" href="{{ pathto(cssfile, 1) }}">
    {%- endfor %}
    {% block extrahead %} {% endblock extrahead %}
    <!--[if lt IE 9]>
      <script src="/js/ie8.js"></script>
      <link rel="stylesheet" href="/theme/ie8.css" />
    <![endif]-->
    {% include "script" ignore missing %}
  </head>
  {% if render_sidebar %}
  <body class="p-cols_design">
  {% else %}
  <body class="b-main">
  {% endif%}
    <div class="b-wrapper">
      <!-- HEADER > -->
      <header class="b-header">
        <div class="b-header-wrapper">
          <nav class="b-header_menu">
            {{ menu.i_menu(page) }}
          </nav>
        </div>
      </header>
      <!-- < HEADER -->

      <div class="b-content b-clearbox">
        {% block content %} {% endblock content %}
      </div>
    </div>

    <!-- FOOTER > -->
    <footer class="b-footer">
      <div class="b-footer-wrapper">
        <nav class="b-footer_menu">
          {{ menu.i_menu(page) }}
          <div class="b-footer-other">
            <a href="http://stable.tarantool.org">1.5 web site and downloads</a>
          </div>
        </nav>
      </div>
    </footer>
  <!-- < FOOTER -->
  </body>
</html>

{# vim: syntax=htmldjango ts=2 sts=2 sw=2 expandtab #}
