{% load i18n %}
{% load static %}
<!DOCTYPE html>
<html xmlns:fb="http://www.facebook.com/2008/fbml" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta charset="utf-8">

<title>{% trans "Garage Numérique Quizzes" %} | {% block title %}{% endblock %}</title>
<meta name="description" content="{% block description %}{% endblock %}">

<!-- styles -->
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<link rel="stylesheet" href="{% static 'css/style.css' %}">
<link rel="icon" href="{% static 'favicon.ico' %}" type="image/x-icon">

</head>

<body>

    <div style="background-color: beige;">
        {% block sidebar %}
        <ul style="list-style:none;" class="sidebar-nav">
        {% if user.is_authenticated %}
          <li>{% trans "Hi " %} {{ user.get_username }}</li>
          <li>
            <form method="post" action="{% url 'logout' %}">
                {% csrf_token %}
                <button class="button-link" type="submit">Se déconnecter</button>
            </form>
          </li>
              <a style="margin-left:90%; margin-right:0;" href="{% url 'quiz_progress'%}?next={{request.path}}">Progression</a>
{% if request.user.is_superuser %}
              <a style="margin-left:90%; margin-right:0;" href="{% url 'quiz_marking'%}?next={{request.path}}">Résultats</a>
              <a style="margin-left:90%; margin-right:0;" href="/admin">Administraion</a>
{% endif %}
          </li>
        {% else %}
          <li><a href="{% url 'login'%}">{% trans "Connect" %}</a></li>
        {% endif %} 
        </ul>
        {% endblock %}
    </div>


<!-- Before the quiz content -->

<div class="container">

{% block content %}

{% endblock %}

</div>

<!-- After the quiz content -->
<div>
    <img style="display: block; margin-left: auto; margin-right: auto;" src="{%  static 'logo.png' %}"/>
</div>



</body>
</html>
