<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->

    {% if title %}
    <title>{{ title }}</title>
    {% else %}
    <title>Fastr Web Client</title>
    {% endif %}

    <link rel=stylesheet type=text/css href="{{ url_for('static', filename='style.css') }}">

    <!-- Latest compiled and minified Bootstrap CSS, optional theme -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css">

    <script src="{{ url_for('static', filename='js/forge.min.js') }}"></script>

    <!-- HTML5 shim and Respond.js for 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/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>
    <!-- fixed navbar -->
    <nav class="navbar navbar-inverse navbar-fixed-top">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                  <span class="sr-only">Toggle navigation</span>
                  <span class="icon-bar"></span>
                  <span class="icon-bar"></span>
                  <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="{{ url_for('index') }}">Fastr Web Client</a>
            </div>
            <div id="navbar" class="navbar-collapse collapse">
                <ul class="nav navbar-nav">
                    {% for endpoint, caption in [
                            ('index', 'Home'),
                            ('websocket_client', 'Websocket Client'),
                            ('networks', 'Networks'),
                            ('tool', 'Tools'),
                            ('doc', 'REST API'),
                            ('prov', 'Provenance'),
                            ('shutdown', 'Shutdown'),
                    ] %}
                      <li{% if endpoint == request.endpoint %} class="active"{% endif %}>
                        <a href="{{ url_for(endpoint) }}">{{ caption }}</a>
                      </li>
                    {% endfor %}
                </ul>
            </div> <!-- /.nav-collapse -->
        </div> <!-- /.container -->
    </nav>

    <div class="container page">
    {% with messages = get_flashed_messages(with_categories=True) %}
      {% if messages %}
        {% for category, message in messages %}
          <!-- available categories: succes, info, warning, danger -->
          <div class="alert alert-{{category}}" role="alert">{{message}}</div>
        {% endfor %}
      {% endif %}
    {% endwith %}

    {% block content %}{% endblock %}
    </div> <!-- /.container page -->


    <!-- jquery and bootstrap js at the end for faster page loading. -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>

    <script src="{{ url_for('static', filename='js/misc_jquery.js') }} "></script>
</body>
</html>
