<!--
#   Copyright © 2021,2022 IsardVDI S.L.
#
#   This file is part of DD
#
#   DD is free software: you can redistribute it and/or modify
#   it under the terms of the GNU Affero General Public License as published by
#   the Free Software Foundation, either version 3 of the License, or (at your
#   option) any later version.
#
#   DD is distributed in the hope that it will be useful, but WITHOUT ANY
#   WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
#   FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
#   details.
#
#   You should have received a copy of the GNU Affero General Public License
#   along with DD. If not, see <https://www.gnu.org/licenses/>.
#
# SPDX-License-Identifier: AGPL-3.0-or-later
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!-- Meta, title, CSS, favicons, etc. -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="no-cache">
    <meta http-equiv="Expires" content="-1">
    <meta http-equiv="Cache-Control" content="no-cache">

    <title>{{ title }} | DD</title>
    <link rel="icon" type="image/png" href="favicon-32x32.png" sizes="32x32" />
    <link rel="icon" type="image/png" href="favicon-16x16.png" sizes="16x16" />
    <!-- Bootstrap -->
    <link href="/vendors/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome -->
    <link href="/vendors/font-awesome/css/font-awesome.min.css" rel="stylesheet">
    <!-- ion.rangeSlider -->
    <link href="/vendors/ion.rangeSlider/css/ion.rangeSlider.css" rel="stylesheet">
    <link href="/vendors/ion.rangeSlider/css/ion.rangeSlider.skinFlat.css" rel="stylesheet">
    <!-- Datatables -->
    <link href="/vendors/datatables.net-bs/css/dataTables.bootstrap.min.css" rel="stylesheet">
    <!-- PNotify -->
    <link href="/vendors/pnotify/dist/pnotify.css" media="all" rel="stylesheet" type="text/css" />
    <link href="/vendors/pnotify/dist/pnotify.buttons.css" media="all" rel="stylesheet" type="text/css" />
    <!-- iCheck -->
    <link href="/vendors/iCheck/skins/flat/green.css" rel="stylesheet">
    <link href="/vendors/select2/dist/css/select2.min.css" rel="stylesheet">
    {% block css %}{% endblock %}
    <!-- Custom Theme Style -->
    <link href="/build/css/custom.css" rel="stylesheet">
    <!-- Isard Style Sheet-->
    <link href="/static/dd.css?2303" rel="stylesheet">
  </head>

  <body class="nav-md">
    <div class="container body" style="margin-top: 50px;">
      <div class="main_container">
        <div class="col-md-3 left_col">
          <div class="left_col scroll-view">
		        {% include 'sidebar.html' %}
          </div>
        </div>
        <!-- top navigation -->
        {% include 'header.html' %}
        <!-- /top navigation -->
        <div class="right_col" role="main">
          <!-- page content -->
          {% block content %}      
          {% endblock %}
          <!-- /page content -->
        </div>
        <!-- footer content -->
        {% include 'footer.html' %}
        <!-- /footer content -->
      </div>
    </div>

    {% include 'pages/modals/common_modals.html' %}


    <!-- jQuery -->
    <script src="/vendors/jquery/dist/jquery.js"></script>
    <!-- Bootstrap -->
    <script src="/vendors/bootstrap/dist/js/bootstrap.min.js"></script>
    <!-- NProgress -->
    <script src="/vendors/nprogress/nprogress.js"></script>
    <!-- Datatables -->
    <script src="/vendors/datatables.net/js/jquery.dataTables.min.js"></script>
    <script src="/vendors/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>
   <!-- Ion.RangeSlider -->
    <script src="/vendors/ion.rangeSlider/js/ion.rangeSlider.min.js"></script>
    <!-- PNotify -->
    <script type="text/javascript" src="/vendors/pnotify/dist/pnotify.js"></script>
    <script type="text/javascript" src="/vendors/pnotify/dist/pnotify.confirm.js"></script>
    <script type="text/javascript" src="/vendors/pnotify/dist/pnotify.buttons.js"></script>
    <!-- validator -->
    <script src="/vendors/validator/validator.js"></script> 
    <!-- Parsley -->
    <script src="/vendors/parsleyjs/dist/parsley.min.js"></script>
    <!-- moment -->   
	  <script src="/vendors/moment/min/moment.min.js"></script>
    <!-- validator -->
    <script src="/vendors/iCheck/icheck.min.js"></script> 
    <!-- bootstrap-progressbar -->
    <script src="/vendors/bootstrap-progressbar/bootstrap-progressbar.min.js"></script>
    <!-- ECharts -->
    <script src="/vendors/echarts/dist/echarts.min.js"></script>
    <!-- Select2 -->
    <script src="/vendors/select2/dist/js/select2.full.min.js"></script>
    <!-- SocketIO -->
    <script src="/node_modules/socket.io/client-dist/socket.io.min.js"></script>
    <script src="/static/js/status_socket.js"></script>

    <!-- isard initializers -->
    <script src="/static/dd.js"></script>
    <!-- Header render -->
    <script type="text/javascript">
      $(document).ready(function() {
        $.ajax({
          type: "GET",
          url:  "https://api.{{ DOMAIN }}/header/html/admin",
          success: function(data) {
            $('#header').html(data)
          }
        })
      })
    </script>
    <!-- flashed messages with pnotify -->
    {% with messages = get_flashed_messages(with_categories=true) %}
	  {% if messages %}
		{% for category, message in messages %}
			<script type="text/javascript">
  			new PNotify({
				title: "{{ nav }}",
				text: "{{ message }}",
				hide: true,
				delay: 2000,
				/~ icon: 'fa fa-alert-sign',
				opacity: 1,
				type: "{{ category }}",
				addclass: "pnotify-center"
			});
			</script>	
		{% endfor %}
	  {% endif %}
	  {% endwith %}
    {% block pagescript %}{% endblock %}
  </body>
</html>
