{% load i18n static %}
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>{% block title %}{% translate "My shop" %}{% endblock %}</title>
    <link href="{% static "css/base.css" %}" rel="stylesheet">
  </head>
  <body>
    <div id="header">
      <a href="/" class="logo">{% translate "My shop" %}</a>
      {% get_current_language as LANGUAGE_CODE %}
      {% get_available_languages as LANGUAGES %}
      {% get_language_info_list for LANGUAGES as languages %}
      <div class="languages">
        <p>{% translate "Language" %}:</p>
        <ul class="languages">
          {% for language in languages %}
            <li>
              <a href="/{{ language.code }}/"
              {% if language.code == LANGUAGE_CODE %} class="selected"{% endif %}>
                {{ language.name_local }}
              </a>
            </li>
          {% endfor %}
        </ul>
      </div>
    </div>

    <div id="subheader">
      <div class="cart">
        {% with total_items=cart|length %}
          {% if total_items > 0 %}
            {% translate "Your cart" %}:
            <a href="{% url "cart:cart_detail" %}">
              {% blocktranslate with total=cart.get_total_price count items=total_items %}
                {{ items }} item, ${{ total }}
              {% plural %}
                {{ items }} items, ${{ total }}
              {% endblocktranslate %}
            </a>
          {% elif not order %}
            {% translate "Your cart is empty." %}
          {% endif %}
        {% endwith %}
      </div>
    </div>
    <div id="content">
      {% block content %}
      {% endblock %}
    </div>
  </body>
</html>
