<!DOCTYPE html>
<html>
  <head>
    <title>{{turkle_site_name}}</title>
    {% load static %}
    <meta charset="utf-8">
    <link href="{% static "turkle/css/turkle.css" %}" rel="stylesheet" type="text/css"/>
    <link href="{% static "turkle/bootstrap-4.1.3/css/bootstrap.min.css" %}" rel="stylesheet" type="text/css"/>
    <link href="{% static "turkle/bootstrap4-glyphicons/css/bootstrap-glyphicons.min.css" %}" rel="stylesheet" type="text/css"/>
    <link rel="icon" type="image/png" sizes="32x32" href="{% static 'favicon-32x32.png' %}">
    <link rel="icon" type="image/png" sizes="16x16" href="{% static 'favicon-16x16.png' %}">
    {% block header %}
    {% endblock %}
  </head>
  <body>
    <div class="container-fluid">
      <nav class="navbar navbar-expand-lg navbar-dark bg-primary">
        <a class="navbar-brand" href="{% url 'index' %}" title="Home">{{turkle_site_name}}</a>
        <ul class="navbar-nav mr-auto">
          <li class="nav-item active">
            <a class="nav-link" href="{% url 'admin:index' %}" title="Administration">Admin</a>
          </li>
        </ul>
        <span class="navbar-text">
          {% if user.is_authenticated %}
          Logged in as <b>{{ user.username }}</b> -
          <a href="{% url 'password_change' %}">Change Password</a> -
          <a href="{% url 'logout' %}?next={% url 'index' %}">Logout</a>
          {% else %}
          <a href="{% url 'login' %}">Login</a>
          {% endif %}
        </span>
      </nav>
      {% block header_row %}
      {% endblock %}

      <div id="messages_container">
      {% if messages %}
        {% for message in messages %}
        <div class="alert alert-{{ message.level_tag }}" role="alert">
          {{ message }}
        </div>
        {% endfor %}
      {% endif %}
      </div>
    </div><!-- /container-fluid -->

    {% block body %}
    {% endblock %}

    {% block footer %}
    {% endblock %}
  </body>
</html>
