<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>Home Dashboard</title>
        <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
        <!-- bootstrap 3.0.2 -->
        <link href="{{ url_for('static', filename='css/bootstrap.min.css') }}" rel="stylesheet" type="text/css" />
        <!-- font Awesome -->
        <link href="{{ url_for('static', filename='css/font-awesome.min.css') }}" rel="stylesheet" type="text/css" />
        <!-- Ionicons -->
        <link href="{{ url_for('static', filename='css/ionicons.min.css') }}" rel="stylesheet" type="text/css" />
        <!-- Theme style -->
        <link href="{{ url_for('static', filename='css/AdminLTE.css') }}" rel="stylesheet" type="text/css" />

        <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
        <!--[if lt IE 9]>
          <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
          <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
        <![endif]-->
    </head>
    <body class="skin-blue">
        <!-- header logo: style can be found in header.less -->
        <header class="header">
            <a href="/" class="logo">
                <!-- Add the class icon to your logo image or logo icon to add the margining -->
                Home!
            </a>
            <!-- Header Navbar: style can be found in header.less -->
            <nav class="navbar navbar-static-top" role="navigation">
                <!-- Sidebar toggle button-->
                <a href="#" class="navbar-btn sidebar-toggle" data-toggle="offcanvas" role="button">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </a>
            </nav>
        </header>
        <div class="wrapper row-offcanvas row-offcanvas-left">
            <!-- Left side column. contains the logo and sidebar -->
            <aside class="left-side sidebar-offcanvas">
                <!-- sidebar: style can be found in sidebar.less -->
                <section class="sidebar">
                    <!-- sidebar menu: : style can be found in sidebar.less -->
                    <ul class="sidebar-menu">
                        <li class="active">
                            <a href="/">
                                <i class="fa fa-dashboard"></i> <span>Dashboard</span>
                            </a>
                        </li>

                        {% for device in devices %}
                        <li>
                            <a href="{{ url_for('.dashboard', device_name=device.area.name) }}">
                                <i class="fa fa-th"></i> <span>{{ device.area.name|title }}</span>
                            </a>
                        </li>
                        {% endfor %}
                    </ul>
                </section>
                <!-- /.sidebar -->
            </aside>

            <!-- Right side column. Contains the navbar and content of the page -->
            <aside class="right-side">

                <section class="content-header">
                    <h1>
                        {% block title %}Title{% endblock %}
                        <small>{% block sub_title %}Sub title{% endblock %}</small>
                    </h1>
                </section>

                <!-- Main content -->
                <section class="content">

                    {% block content %}{% endblock %}

                </section><!-- /.content -->
            </aside><!-- /.right-side -->
        </div><!-- ./wrapper -->

        <!-- jQuery 2.0.2 -->
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
        <!-- Bootstrap -->
        <script src="{{ url_for('static', filename='js/bootstrap.min.js') }}" type="text/javascript"></script>

        <script src="{{ url_for('static', filename='js/AdminLTE/app.js') }}" type="text/javascript"></script>
        <script src="{{ url_for('static', filename='js/plugins/flot/jquery.flot.min.js') }}" type="text/javascript"></script>
        <script src="{{ url_for('static', filename='js/plugins/flot/jquery.flot.resize.min.js') }}" type="text/javascript"></script>
        <script src="{{ url_for('static', filename='js/plugins/flot/jquery.flot.time.min.js') }}" type="text/javascript"></script>
        <script src="{{ url_for('static', filename='js/plugins/sparkline/jquery.sparkline.min.js') }}" type="text/javascript"></script>

        <script src="{{ url_for('static', filename='js/home.js') }}" type="text/javascript"></script>

        {% block extra_js %}{% endblock %}

    </body>
</html>
