{% load i18n staticfiles %}

{% get_current_language as LANGUAGE_CODE %}

<!DOCTYPE html>
<html language="{{ 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.0">
    {# The above three meta tags should be first #}
   
    {% with description=namespace.description %}
      <meta name="description"
            content="{% block description %}{{ description }}{% endblock %}">
    {% endwith %}

    {% with author=namespace.author %}
      <meta name="author"
            content="{% block author %}{{ author }}{% endblock %}">
    {% endwith %}

    {% with title=namespace.title %}
      <title>
        {% block title %}{{ title }}{% endblock %}
        {% block subtitle %}{% endblock %}
      </title>
    {% endwith %}

    {# Favicon #}
    {% block favicon %}
    <link rel="icon" type="image/png"
                     href="{% static namespace.favicon %}">
    {% endblock %}

    {# Styles #}
    {% block basestyles %}
    <link href="{% static "thorson_wiki/css/bootstrap.min.css" %}"
          rel="stylesheet">
    <link href="{% static "thorson_wiki/css/base.css" %}"
          rel="stylesheet">
    {% endblock %}

    {% block addstyles %}
    {% endblock %}

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements. -->
    <!--[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]-->

    {# Javascript #}
    {% block jsheader %}
    {% endblock %}
  </head>

  <body>
    {% include "thorson_wiki/_nav.html" %}

    <div class="container">
      {% block content %}
      {% endblock %}
    </div>

    {# Additional Javascript #}
    {% block jsfooterbase %}
    <script src="{% static "thorson_wiki/js/jquery.min.js" %}"></script>
    <script src="{% static "thorson_wiki/js/bootstrap.min.js" %}"></script>
    <script type="text/javascript">
$('.namespace-select').click(function() {
  var searchspace = $(this).data('namespace');
  var searchname = $(this).data('namespace-title');
  var hiddenfield = $('#namespace-search-field');
  var label = $('#namespace-search-dropdown-label');
  hiddenfield.val(searchspace);
  label.html(searchname);
});
    </script>
    {% endblock %}

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