{% extends "combo/page_template.html" %}
{% load static i18n combo gadjo %}

{% block bodyclasses %}
{{ block.super }}
{% skeleton_extra_placeholder body-class-authenticated %}
{% if not user.is_authenticated %}anonymous{% endif %}
{% end_skeleton_extra_placeholder %}
{% endblock %}

{% block content %}
  <div id="content" class="gru-content"> {# only change wrt base template #}
  {% block combo-content %}
    {% block page-content %}
      <div id="columns-wrapper">
        <div id="columns" class="clearfix">
        {% trans "Content" as name %}
        {% placeholder "content" name=name %}
        </div>
      </div>
    {% endblock %}
  {% endblock %}
  </div>
{% endblock %}

{% block footer %}
  {% trans "Footer" as name %}
  {% placeholder "footer" acquired=True name=name optional=True %}
  <script> {# hack fargo title #}
if ($('#user-files').length) {
  var $title = $('#user-files').prev();
  $title.replaceWith('<h1>' + $title.text() + '</h1>');
}
  </script>
{% endblock %}

{% block account %}
{% skeleton_extra_placeholder account %}
        {% if user.is_authenticated %}
        <a href="{{ account_url}}" class="nav-account nav-btn" title="Mon compte">
            <span class="flexbox">
                <span class="picto"></span>
                <span class="text">{{user.first_name}} {{user.last_name|slice:":1"}}.</span>
            </span>
        </a>
        <button title="Se déconnecter" class="nav-btn nav-logout" onclick="window.location = '{{ logout_url }}'">
            <span class="flexbox">
                <span class="picto"></span>
            </span>
        </button>
        {% endif %}
        {% if not user.is_authenticated %}
        <a href="{{ login_url }}" class="nav-account nav-btn login-button" title="Mon compte">
            <span class="flexbox">
                <span class="picto"></span>
                <span class="text">Connexion</span>
            </span>
        </a>


        {% endif %}
{% end_skeleton_extra_placeholder %}
{% endblock %}
