{% extends "theme.orig.html" %}

{% load static i18n combo gadjo %}
{% block extra_top_head %}
{{ block.super }}
<script src="{{site_base}}{% xstatic 'jquery' 'jquery.min.js' %}"></script>
{% skeleton_extra_placeholder extra-top-head %}
{% end_skeleton_extra_placeholder %}
{% endblock %}

{% block extra_scripts %}
<script src="{{site_base}}{% static 'js/combo.public.js' %}?{% start_timestamp %}"></script>
<script src="{{site_base}}{% static 'js/combo.back.js' %}?{% start_timestamp %}"></script>
<script src="{{site_base}}/__services.js"></script>
{% if not no_extra_js %}
<script src="{{site_base}}{% static "" %}{{css_variant}}/extra.js?{% start_timestamp %}"></script>
{% endif %}
{% skeleton_extra_placeholder extra-head %}
{% end_skeleton_extra_placeholder %}
{% endblock %}

{% block bodyattrs %}
data-api-root="{{ site_base }}/api/"
{% if check_badges %}data-check-badges="true"{% endif %}
{% if page.picture %}data-picture="{{site_base}}{{page.picture.url}}"{% endif %}
{% skeleton_extra_placeholder extra-body-args %}
{% end_skeleton_extra_placeholder %}
{% endblock %}

{% block bodyclasses %}template-neutre page-{{ page.slug }} {% if pages %}section-{{pages.0.slug}}{% endif %} {% skeleton_extra_placeholder extra-body-class %} {% if user.is_authenticated %}authenticated-user{% else %}anonymous-user{% endif %} {% end_skeleton_extra_placeholder %} {% if page.picture %}has-picture{% endif %} {% endblock %}

{% block title %} - {% if render_skeleton %}{% skeleton_extra_placeholder title %}{% firstof page_title site_title %}{% end_skeleton_extra_placeholder %}{% else %}{{page.title}}{% endif %}{% endblock %}

{% block header-top %}
{% endblock %}
{% block header-title %}
{% comment %} into #top {% endcomment %}
{% placeholder "headerlogo" name="Logo haut" %}
{% placeholder "headertitle" name="Titre haut" %}
{% endblock %}
{% block user-info %}
{% endblock %}

{% block nav %}
<nav>
  <div id="nav" class="gru-nav">
  {% block menu %}
  {% show_menu depth=2 ignore_visibility=True %}
  {% placeholder "menu_right" %}
  {% endblock %}
  </div>
  <div class="user-nav">
    {% skeleton_extra_placeholder "user-nav-link" %}
    {% if user.is_authenticated %}
    <span class="logged-in">
      {% if idp_account_url %}<a href="{{idp_account_url}}">{% endif %}
      <span class="connected-user">{{user.first_name}} {{user.last_name}}</span>{% if idp_account_url %}</a>{% endif %}
      <a accesskey="o" class="logout" href="{% url 'auth_logout' %}">Déconnexion</a>
    </span>
    {% else %}
      {% if idp_registration_url %}
      <span class="login"><a accesskey="2" href="{% url 'auth_login' %}">Connexion</a> <span class="sep">/</span>
              <a class="registration" href="{{idp_registration_url}}">Inscription</a></span>
      {% else %}
      <span class="login"><a accesskey="2" href="{% url 'auth_login' %}">Connexion <span class="sep">/</span> Inscription</a></span>
      {% endif %}
    {% endif %}
    {% end_skeleton_extra_placeholder %}
  </div>
</nav>
{% endblock %}

{% block messages %}
{{ block.super }}
{% placeholder "messages" %}
{% endblock %}

{% block content %}
  {% block combo-content %}
    {% block page-content %}
      <div id="columns">
      {% trans "Content" as name %}
      {% placeholder "content" name=name %}
      </div>
    {% endblock %}
  {% endblock %}
{% endblock %}


{% block footer %}
  {% trans "Footer" as name %}
  {% placeholder "footer" acquired=True name=name %}
{% endblock %}
