{% load menu_tags cms_tags sekizai_tags i18n %}
<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="content-language" content="fr" />
    <title>Compte Citoyen :: Montpellier Méditerranée Métropole :: {% page_attribute "page_title" %}</title>
    <link rel="shortcut icon" href="/static/themes/django-montpellier/favicon.png">
    <link rel="stylesheet" type="text/css" href="/static/themes/django-montpellier/style.css">
    <link href='https://fonts.googleapis.com/css?family=Lato:400,700,700italic,400italic|Carme|Arvo' rel='stylesheet' type='text/css'>
    {% render_block "css" %}
  </head>
  <body {% block bodyargs %}{% endblock %}>
    {% cms_toolbar %}
    <div id="page">
      <div id="header">
        <div id="top"> 
          <a href="/" accesskey="1"><img src="/static/themes/django-montpellier/logo.png" 
            title="Montpellier agglomération" /></a>
          <div class="region-header">
            {% if user.is_authenticated %}
              <div id="toplinks">
                <span><a class="logout" href="{% url 'account_logout' %}">{% trans "Logout" %}</a>
                </span>
              </div>
              <div id="username">{{ user.first_name }} {{ user.last_name }}</div>
            {% endif %}
          </div>
        </div>
        {% block messages %}
          {% if messages %}
            <div id="messages">
              <ul class="messages">
                  {% for message in messages %}
                  <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
                  {% endfor %}
              </ul>
            </div>
          {% endif %}
        {% endblock %}
      </div> <!-- header -->
      <div id="main-content-wrapper">
        {% block title %}{% endblock %}
        {% block menu %}
        <div id="menu">
            <ul><li><a href="{{ site_agglo_montpellier_url }}">Ma métropole</a></li
                  >{% show_menu_below_id "top-page" 0 100 100 100 %}</ul>
        </div>
        {% endblock %}
        <div id="main-content">
          <div id="content">
            {% block content %}
              <div id="error-404">
                <h2>Page inexistante</h2>
                <p>La page <tt>{{ request_path}}</tt> n'existe pas. Souhaitez-vous revenir à <a href="/">l'accueil</a> ?</p>
              </div>
            {% endblock %}
          </div> <!-- #content -->
        </div> <!-- #main-content -->
      </div> <!-- #main-content-wrapper -->
      <div id="footer">
        <!-- p id="bottom-links">
          {% show_menu_below_id "menu-du-bas" %}
          {% if request.user.is_staff %}
            <a href="/admin">Administration</a>
          {% endif %}
        </p -->
        <p id="legal">Copyright © 2006-2013 Entr'ouvert</p>
      </div>
    </div>
    {% render_block "js" %}
    <script>
      function toTitleCase(str)
      {
        return str.replace(/\w\S*/g,
          function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();});
      }
    </script>
  </body>
</html>
