{% load static i18n bootstrap3 ndh %}
<!DOCTYPE html>
<html lang="{{ LANGUAGE_CODE }}">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>{% block pagetitle %}NDH pagetitle block {% endblock %}</title>
    <link rel="stylesheet" href="{% bootstrap_css_url %}" crossorigin="anonymous" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" >

    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
    <link rel="stylesheet" href="{% static "css/ndh.css" %}" />
    {% block style %}{% endblock %}
  </head>
  <body>
    <nav class="navbar navbar-inverse navbar-fixed-top">
      <div class="container-fluid">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse" 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="/" id="brand" rel="home">{% block sitetitle %}NDH sitetitle block {% endblock%}</a>
        </div>

        <div class="collapse navbar-collapse">
          <ul class="nav navbar-nav">
            {% block navbarleft %}<li><a href="#">NDH navbarleft block</a></li>{% endblock %}
          </ul>
          <ul class="nav navbar-nav navbar-right">
            {% if request.user.is_authenticated %}
              <li><a href="{% url 'logout' %}">Log out</a></li>
              {% if request.user.is_superuser %}
                <li><a href="{% url 'admin:index' %}">Admin</a></li>
                {% if object_list %}
                <li><a href="{{ object_list|admin_url }}">List</a></li>
                {% endif %}
                {% if object %}
                <li><a href="{{ object|admin_url }}">Item</a></li>
                {% endif %}
              {% endif %}
            {% else %}
              <li><a href="{% url 'login' %}?next={{ request.path }}">Log in</a></li>
            {% endif %}
          </ul>
        </div>
      </div>
    </nav>
    <div class="container">
      {% bootstrap_messages %}
      {% block content %}
      <h1>NDH content block</h1>
      {% endblock %}
    </div>
    <hr>
    <script src="{% bootstrap_jquery_url %}"></script>
    <script src="{% bootstrap_javascript_url %}" crossorigin="anonymous" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" ></script>
    <script>{% block scripts %}{% endblock %}</script>
  </body>
</html>

