<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <!-- Latest compiled and minified CSS -->
    <!-- Latest compiled and minified CSS -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">

    <!-- Optional theme -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap-theme.min.css" integrity="sha384-6pzBo3FDv/PJ8r2KRkGHifhEocL+1X2rVCTTkUfGk7/0pbek5mMa1upzvWbrUbOZ" crossorigin="anonymous">


    <!-- Latest compiled and minified JavaScript -->
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script>
    <link rel="stylesheet" href="css/style.css">
    <title>{% block title %}{% endblock %}</title>
</head>
<body style="padding-top: 70px;">
        <nav class="navbar navbar-inverse navbar-fixed-top">
      <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
            <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') }}">Home</a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
          <ul class="nav navbar-nav">
              {% if current_user.is_authenticated %}
            <li><a href="{{ url_for('user', username=current_user.username) }}">Network<span class="sr-only">(current)</span></a></li>
            <li><a href="{{ url_for('register_device') }}">Register New Device</a></li>
              <li><a href="{{ url_for('service.index') }}">Device Service</a></li>
              {% endif %}
          </ul>

<!--          <form class="navbar-form navbar-left" method="GET">-->
<!--            <div class="form-group">-->
<!--              <input type="text" class="form-control" placeholder="Search" name="q" value="{{ request.args.get('q', '') }}">-->
<!--            </div>-->
<!--            <button type="submit" class="btn btn-default">Search</button>-->
<!--          </form>-->

          <ul class="nav navbar-nav navbar-right">
               {% if current_user.is_anonymous %}
            <li><a href="{{ url_for('login') }}">Login</a></li>
              {% else %}
              <li><a href="{{ url_for('logout') }}">Logout</a></li>
              {% endif %}
          </ul>
        </div><!-- /.navbar-collapse -->
      </div><!-- /.container-fluid -->
    </nav>
    <div class="container">
        <div class="row">
            {% with messages = get_flashed_messages() %}
                {% if messages %}
                    {% for message in messages %}
                        <div class="alert alert-info" role="alert">{{ message }}</div>
                    {% endfor %}
                 {% endif %}
            {% endwith %}
        </div>
    </div>
 {% block content %}{% endblock %}
</body>
</html>
