<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>HAL</title>

    <!-- Bootstrap core CSS -->
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/bootstrap-switch.min.css" rel="stylesheet">
    <link href="css/c3.min.css" rel="stylesheet">
    <link href="css/hal.css" rel="stylesheet">

    <script src="js/jquery-1.11.3.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/bootstrap-switch.min.js"></script>
    <script src="js/moment.js"></script>
    <script src="js/hal.js"></script>

    <!-- charts -->
    <script src="js/d3.min.js"></script>
    <script src="js/c3.js"></script>

</head>

<body>
<nav class="navbar navbar-inverse navbar-fixed-top">
    <div class="container-fluid">
        <div class="navbar-header">
            <!-- Title and Icon -->
            <a class="navbar-brand" href="/">
                <span class="glyphicon glyphicon-record" style="color:red"></span>
                <b>HAL</b>
            </a>
            <!-- Hamburger button for smaller screens -->
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
        </div>
        <!-- Main navigation -->
        <div id="navbar" class="navbar-collapse collapse">
            <ul class="nav navbar-nav navbar-left">
                {{#rootNav}}
                {{^.getSubNavs().length}}
                <li {{#.isActive()}}class="active"{{/.isActive()}}>
                    <a href="{{.getURL()}}" >{{.getName()}}</a>
                </li>
                {{/.getSubNavs().length}}
                {{#.getSubNavs().length}}
                <li class="dropdown {{#.isActive()}}active{{/.isActive()}}">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{.getName()}}</a>
                    <ul class="dropdown-menu">
                        {{#.getSubNavs()}}
                        <li {{#.isActive()}}class="active"{{/.isActive()}}>
                            <a href="{{.getURL()}}">{{.getName()}}</a>
                        </li>
                        {{/.getSubNavs()}}
                    </ul>
                </li>
                {{/.getSubNavs().length}}
                {{/rootNav}}
            </ul>

            <!-- User navigation -->
            <ul class="nav navbar-nav navbar-right">
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        <span class="glyphicon glyphicon-user"></span>
                        <strong>{{user.getUsername()}}</strong>
                    </a>
                    <ul class="dropdown-menu">
                        <li>
                            <div align="center">
                                <img src="{{user.getAvatarUrl()}}" />
                            </div>
                        </li>
                        <li class="divider"></li>
                        {{#userNav}}
                        <li {{#.isActive()}}class="active"{{/.isActive()}}>
                            <a href="{{.getURL()}}">{{.getName()}}</a>
                        </li>
                        {{/userNav}}
                    </ul>
                </li>
            </ul>
        </div>
    </div>
</nav>

<div class="container-fluid">
    <div class="row">
        {{#showSubNav}}
        <!-- Sub navigation -->
        <div class="col-sm-3 col-md-2 sidebar">
            <ul id="sub-navbar" class="nav nav-sidebar">
                {{#subNav}}
                <li {{#.isActive()}}class="active"{{/.isActive()}}>
                    <a href="{{.getURL()}}">{{.getName()}}</a>
                </li>
                {{/subNav}}
            </ul>
        </div>
        {{/showSubNav}}

        {{#showSubNav}}<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">{{/showSubNav}}
        {{^showSubNav}}<div class="main">{{/showSubNav}}
            {{alerts}}
            {{content}}
        </div>

    </div>
</div>
</body>
</html>
