<!DOCTYPE html>
{% import 'admin/layout.html' as layout with context -%}
{% import 'flask-admin/layout.html' as adminlte_layout with context -%}
{% import 'admin/static.html' as admin_static with context %}
{% import 'flask-admin/static.html' as adminlte_static with context %}
<html lang="en">
<head>
    <title>{% block title %}{% if admin_view.category %}{{ admin_view.category }} - {% endif %}{{ admin_view.name }} - {{ admin_view.admin.name }}{% endblock %}</title>
    {% block head_meta %}
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="description" content="">
        <meta name="author" content="">
    {% endblock head_meta %}

  {% block head_css %}
      <!-- Bootstrap 4.2.1 -->
      <link href="{{ admin_static.url(filename='bootstrap/bootstrap4/css/bootstrap.min.css', v='4.2.1') }}" rel="stylesheet">
      <!-- Font Awesome -->
      <link rel="stylesheet" href="{{ adminlte_static.url('plugins/fontawesome-free/css/all.min.css') }}">
      <!-- Ionicons -->
      <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
      <!-- Tempusdominus Bbootstrap 4 -->
      <link rel="stylesheet" href="{{ adminlte_static.url('plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css') }}">
      <!-- iCheck -->
      <link rel="stylesheet" href="{{ adminlte_static.url('plugins/icheck-bootstrap/icheck-bootstrap.min.css') }}">
      <!-- JQVMap -->
      <link rel="stylesheet" href="{{ adminlte_static.url('plugins/jqvmap/jqvmap.min.css') }}">
      <!-- overlayScrollbars -->
      <link rel="stylesheet" href="{{ adminlte_static.url('plugins/overlayScrollbars/css/OverlayScrollbars.min.css') }}">
      <!-- Daterange picker -->
      <link rel="stylesheet" href="{{ adminlte_static.url('plugins/daterangepicker/daterangepicker.css') }}">
      <!-- summernote -->
      <link rel="stylesheet" href="{{ adminlte_static.url('plugins/summernote/summernote-bs4.css') }}">

      <link rel="stylesheet" href="{{ adminlte_static.url('css/adminlte.min.css') }}">

      <!-- Google Font: Source Sans Pro -->
      <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">

      <link href="{{ admin_static.url(filename='admin/css/bootstrap4/admin.css', v='1.1.1') }}" rel="stylesheet">
      <link href="{{ admin_static.url(filename='bootstrap/bootstrap4/css/font-awesome.min.css', v='4.7.0') }}" rel="stylesheet">
      <link href="{{ admin_static.url(filename='admin/css/bootstrap4/submenu.css') }}" rel="stylesheet">
      {% if admin_view.extra_css %}
        {% for css_url in admin_view.extra_css %}
          <link href="{{ css_url }}" rel="stylesheet">
        {% endfor %}
      {% endif %}
      <style>
        .hide {
            display: none;
        }
      </style>
  
  {% endblock head_css %}

  {% block head %}
  {% endblock head %}

  {% block head_tail %}
  {% endblock head_tail %}
</head>

<body class="hold-transition sidebar-mini layout-fixed">
{% block page_body %}
<div class="wrapper">
  <nav class="main-header navbar navbar-expand navbar-white navbar-light">
    <ul class="navbar-nav">
      <li class="nav-item">
        <a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars"></i></a>
      </li>
    </ul>

    {% block nav_control %}
    {% endblock %}

    <ul class="navbar-nav ml-auto">
        {% block access_control %}
        {% endblock %}
    </ul>

    {% block menu_links %}
    <ul class="navbar-nav navbar-right">
    {{ layout.menu_links() }}
    </ul>
    {% endblock %}
  </nav>

  <aside class="main-sidebar sidebar-dark-primary elevation-4">
    <!-- Logo -->
      {% block brand %}
        <a href="{{ admin_view.admin.url }}" class="brand-link">
          <img src="{{ adminlte_static.url('img/AdminLTELogo.png') }}" alt="AdminLTE Logo" class="brand-image img-circle elevation-3"
               style="opacity: .8">
          <span class="brand-text font-weight-light">{{ admin_view.admin.name }}</span>
        </a>
      {% endblock brand %}

    <div class="sidebar">
      {% block user_panel %}
      <div class="user-panel mt-3 pb-3 mb-3 d-flex">
        <div class="image">
          <img src="{{ adminlte_static.url('img/avatar.png') }}" class="img-circle elevation-2" alt="User Image">
        </div>
        <div class="info">
            <span class="d-block">
                <a href="#" class="d-block">Alexander Pierce</a>
            </span>
        </div>
      </div>
      {% endblock user_panel %}

      {% block main_menu %}
      <nav class="mt-2">
        <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
          {{ adminlte_layout.menu() }}
        </ul>
      </nav>
      {% endblock main_menu %}
    </div>
  </aside>

  <div class="content-wrapper">
    <div class="content">
      <div class="container-fluid">
        {% block messages %}
            {{ layout.messages() }}
        {% endblock %}

        {% set render_ctx = h.resolve_ctx() %}

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

    <footer class="main-footer">
        {% block footer %}
        <div class="float-right d-none d-sm-inline">
            Version 1.0.0
        </div>
        <strong>Copyright © 2014-2019 <a href="http://adminlte.io">AdminLTE.io</a>.</strong> All rights reserved.
        {% endblock footer %}
    </footer>

</div>
{% endblock page_body %}

{% block tail_js %}
    <script src="{{ admin_static.url(filename='bootstrap/bootstrap4/js/popper.min.js') }}" type="text/javascript"></script>
    <script src="{{ admin_static.url(filename='vendor/jquery.min.js', v='2.1.4') }}" type="text/javascript"></script>
    <script src="{{ admin_static.url(filename='bootstrap/bootstrap4/js/bootstrap.min.js', v='4.2.1') }}" type="text/javascript"></script>
    <script src="{{ admin_static.url(filename='vendor/moment.min.js', v='2.9.0') }}" type="text/javascript"></script>
    <script src="{{ admin_static.url(filename='vendor/bootstrap4/util.js', v='4.3.1') }}" type="text/javascript"></script>
    <script src="{{ admin_static.url(filename='vendor/bootstrap4/dropdown.js', v='4.3.1') }}" type="text/javascript"></script>
    <script src="{{ admin_static.url(filename='vendor/select2/select2.min.js', v='4.2.1') }}" type="text/javascript"></script>
    {% if admin_view.extra_js %}
      {% for js_url in admin_view.extra_js %}
        <script src="{{ js_url }}" type="text/javascript"></script>
      {% endfor %}
    {% endif %}

    <!-- jQuery UI 1.11.4 -->
    <script src="{{ adminlte_static.url('plugins/jquery-ui/jquery-ui.min.js') }}"></script>
    <!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
    <script>
      $.widget.bridge('uibutton', $.ui.button)
    </script>
    <!-- Bootstrap 4 -->
    <script src="{{ adminlte_static.url('plugins/bootstrap/js/bootstrap.bundle.min.js') }}"></script>
    <!-- ChartJS -->
    <script src="{{ adminlte_static.url('plugins/chart.js/Chart.min.js') }}"></script>
    <!-- Sparkline -->
    <script src="{{ adminlte_static.url('plugins/sparklines/sparkline.js') }}"></script>
    <!-- JQVMap -->
    <script src="{{ adminlte_static.url('plugins/jqvmap/jquery.vmap.min.js') }}"></script>
    <script src="{{ adminlte_static.url('plugins/jqvmap/maps/jquery.vmap.usa.js') }}"></script>
    <!-- jQuery Knob Chart -->
    <script src="{{ adminlte_static.url('plugins/jquery-knob/jquery.knob.min.js') }}"></script>
    <!-- daterangepicker -->
    <script src="{{ adminlte_static.url('plugins/moment/moment.min.js') }}"></script>
    <script src="{{ adminlte_static.url('plugins/daterangepicker/daterangepicker.js') }}"></script>
    <!-- Tempusdominus Bootstrap 4 -->
    <script src="{{ adminlte_static.url('plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js') }}"></script>
    <!-- Summernote -->
    <script src="{{ adminlte_static.url('plugins/summernote/summernote-bs4.min.js') }}"></script>
    <!-- overlayScrollbars -->
    <script src="{{ adminlte_static.url('plugins/overlayScrollbars/js/jquery.overlayScrollbars.min.js') }}"></script>
    <script src="{{ adminlte_static.url('js/adminlte.min.js') }}"></script>
{% endblock tail_js %}

{% block tail %}
{% endblock tail %}

</body>
</html>
