<!DOCTYPE html>
{% load static %}
<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 -->
    <title>{% block title %}{% endblock %}</title>
    <link rel="shortcut icon" type="image/png" href="{% static 'panel/favicon.ico' %}"/>
    <link rel="apple-touch-icon" sizes="180x180" href="{% static 'panel/apple-touch-icon.png' %}">
    <link rel="icon" type="image/png" sizes="32x32" href="{% static 'panel/favicon-32x32.png' %}">
    <link rel="icon" type="image/png" sizes="16x16" href="{% static 'panel/favicon-16x16.png' %}">
    <link rel="manifest" href="{% static 'panel/site.webmanifest' %}">
    <!-- Bootstrap -->
    <link href="{% static 'panel/css/bootstrap.min.css' %}" rel="stylesheet">
    {% block extrahead %}{% endblock %}
  </head>
  <body>
    <header class="navbar navbar-static-top bs-docs-nav" id="top" role="banner">
      <div class="container">
        <div class="navbar-header">
          <button class="navbar-toggle collapsed" type="button" data-toggle="collapse" data-target=".bs-navbar-collapse">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <div class="navbar-brand">
            <img height="50" src="{% static 'panel/logo.svg' %}"/>
          </div>
        </div>
        <nav class="collapse navbar-collapse bs-navbar-collapse">
          <ul class="nav navbar-nav">
          {% block navlist%}{% endblock %}
          </ul>
          <ul class="nav navbar-nav navbar-right">
            <li><a href="/docs/">API docs</a></li>
            <li><a href="https://jenkins.mgm.sipwise.com">Jenkins</a></li>
            {% block applist%}
            <li><a href="{% url 'release_dashboard:index'%}">Release Dashboard</a></li>
            {% endblock %}
            {% if user.is_authenticated %}
              <li>
                <a class="bg-info" href="{% url 'rest_framework:logout' %}?next={% url 'panel:index' %}"> logout <span class="glyphicon glyphicon glyphicon-user" aria-hidden="true"></span> {{ user.get_username }}</a>
              </li>
            {% else %}
              <li>
                <a href="{% url 'rest_framework:login' %}?next={{request.path}}">
                  login <span class="glyphicon glyphicon glyphicon-user" aria-hidden="true"></span>
                </a>
              </li>
            {% endif %}
          </ul>
        </nav>
      </div>
    </header>
    {% block content %}{% endblock %}
    <script src="{% static 'panel/js/jquery-2.1.3.js' %}"></script>
    <script src="{% static 'panel/js/bootstrap.js' %}"></script>
    {% block extrajs %}{% endblock %}
  </body>
</html>
