{% load trans from i18n %}
{% load staticfiles %}

<!DOCTYPE html>
<html lang="{{ LANGUAGE_CODE }}">
    <head>
        <title>{% block title %}{% block subtitle %}{% endblock %} - Demo{% endblock %}</title>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8">
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        {% block head_meta %}
        {% endblock %}

        <link rel="stylesheet" href="{% static 'css/bootstrap.css' %}">
        <link rel="stylesheet" href="{% static 'css/demo.css' %}">

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

        <style type="text/css" id="holderjs-style"></style>

        {% block head_styles %}
        {% endblock %}

        {% block head_scripts %}
        {% endblock %}
    </head>

    <body>
        <div class="demo-masthead">
            <div class="container">
                <nav class="demo-nav">
                  <a class="demo-nav-item {% block menu-home-class %}{% endblock %}" href="/">Home</a>
                  <a class="demo-nav-item {% block menu-blog-class %}{% endblock %}" href="/blog">Blog</a>
                  {% if request.user.is_authenticated %}<a class="demo-nav-item" href="{% url 'account_logout' %}">Sign Out of {{ request.user }}</a>{% else %}<a class="demo-nav-item" href="{% url 'account_login' %}">Sign In</a>{% endif %}
                </nav>
            </div>
        </div>

        <div class="container">
            {% if messages %}
                <hr/>
                <h4>Messages:</h4>
                <div>
                    <ul>
                    {% for message in messages %}
                        <li>{{message}}</li>
                    {% endfor %}
                    </ul>
                </div>
                <hr/>
            {% endif %}

            <p>
                {% block content %}{% endblock %}
            </p>
        </div>

        <div class="demo-footer">
            <p>Django-and-a-blog demo, layout using <a href="http://getbootstrap.com/">Bootstrap</a> and inspired by by <a href="https://twitter.com/mdo">@mdo</a>.</p>
            <p>
                <a href="#">Back to top</a>
            </p>
        </div>

        {% comment %}
        Bootstrap core JavaScript
        ==================================================
        {% endcomment %}
        <script src="{% static 'js/jquery.js' %}"></script>
        <script src="{% static 'js/bootstrap.js' %}"></script>
        <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
        <script src="{% static 'js/ie10-viewport-bug-workaround.js' %}"></script>

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