{% extends 'home.html' %}

{% block container %}
  <div class="top-pad">
    {% for product in products.items %}
      <div class="well">
        <h2>
          <a href="{{ url_for('catalog.product', id=product.id) }}">{{ product.name }}</a>
          <small>$ {{ product.price }}</small>
        </h2>
      </div>
    {% endfor %}
    {% if products.has_prev %}
      <a href="{{ url_for('catalog.products', page=products.prev_num) }}">
        {{_("<< Previous Page")}}
      </a>
    {% else %}
      {{_("No Previous Page")}}
    {% endif %} 
    {{ ngettext('%(num)d page', '%(num)d pages', products.pages) }} |
    {% if products.has_next %}
      <a href="{{ url_for('catalog.products', page=products.next_num) }}">
        {{_("Next Page >>")}}
      </a>
    {% else %}
      {{_("No Next Page")}}
    {% endif %}
  </div>
{% endblock %}
