<!DOCTYPE html>
<html lang="en">
  <head>
    <title>{{ title }}</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" media="all" type="text/css" href="{{static_url('css/powa-all.min.css')}}" />
    <link rel="icon" type="image/x-icon" href="{{ static_url('img/favicon/favicon.ico') }}">
    <link rel="shortcut icon" href="{{static_url('img/favicon/favicon.ico') }}" type="image/x-icon" />
    <meta name="msapplication-TileColor" content="#2b5797">
    <meta name="msapplication-TileImage" content="{{ static_url('img/favicon/mstile-144x144.png') }}">
    {% block header %} {% end %}
  </head>
  <body>
    <div class="off-canvas-wrap" id="offcanvas" data-offcanvas>
      <div class="inner-wrap">
        <nav class="top-bar" data-topbar role="navigation">
          <ul class="title-area">
            <li class="name">

            <h1><a href="#"><img src="{{
                static_url('img/favicon/favicon-32x32.png')}}"/>&nbsp;PoWA</a></h1>
            </li>
          </ul>
          <section class="top-bar-section">
            <ul class="left">
            <li>
            <a id="menu-toggle" class="menu-icon" href="#" ><span></span></a>
            </li>
            </ul>
          </section>

          <section class="top-bar-section">
            {% if current_user %}
              <ul class="right">
                <li>
                  <div class="" type="text" id="daterangepicker">
                    <input data-role="start_date"></input>
                    <input data-role="end_date"></input>
                  </div>
                </li>
                <li class="title powa-text">
                  <a href="#"><span>{{title}}</span></a>
                </li>

                <li>
                  <a href="{{ reverse_url('logout')}}">Logout</a>
                </li>
              </ul>

            {% end %}
          </section>
        </nav>
    <div class="row full-width">
      <div class="main">
        <div class="row">
        <div>
          {% if handler.menu %}
          <ul class="breadcrumbs">
            {% set last = len(handler.menu.get_breadcrumb()) - 1 %}
            {% for i, crumb_item in enumerate(handler.menu.get_breadcrumb()) %}
            <li class="{{'current' if last == i else ''}}">
            <a data-url-has-params href="{{
              reverse_url_with_params(crumb_item.url_name, url_args=crumb_item.url_params.values())}}">{{crumb_item.title}}</a>
            </li>
            {% end %}
          </ul>
          {% end %}
        </div>
        </div>
        <div>
        {% module Messages() %}
        </div>
        {% block content %} {% end %}
      </div>
    <footer class="row full-width" >
    <div class="large-12 columns" >
      <div class="row hide-for-small">
        <div class="large-6 columns">
          <ul class="inline-list ">
            <li>Version {{version()}}</li>
            <li>&copy; 2014 Dalibo</li>
            <li><a href="http://dalibo.github.io/powa">http://dalibo.github.io/powa</a></li>
          </ul>
        </div>
        <div class="large-6 columns">
          <ul class="inline-list right">
            <li><a href="http://www.dalibo.com"><i class="fa fa-stethoscope"></i>Get support</a></li>
            <li><a href="https://twitter.com/dalibo"><i class="fa fa-twitter"></i>Follow us</a></li>
            <li><a href="https://github.com/dalibo/powa/issues"><i class="fa fa-bug"></i>Report a bug</a></li>
          </ul>
        </div>

      </div>
    </div>
    </footer>
    </div>

      <aside class="left-off-canvas-menu" id="left-menu">
      {% module SideBar(handler.menu) %}
      </aside>
      <a class="exit-off-canvas"></a>
      </div>
    </div>

      {% if handler.application.settings['debug'] %}
        <script data-main="{{ static_url('js/config.js')}}" src="{{static_url('js/require.js')}}"></script>
      {% else %}
        <script data-main="{{ static_url('js/powa.min-all.js')}}" src="{{static_url('js/require.js')}}"></script>
      {% end %}
  </body>
</html>
