{% extends 'base.html' %}
{% block content %}
{% load static %}


  <section id="aa-product">
    <div class="container">
      <div class="row">
        <div class="col-md-12">
          <div class="row">
            <div class="aa-product-area">
              <div class="aa-product-inner">
                <!-- start prduct navigation -->
                 <ul class="nav nav-tabs aa-products-tab">
                    <li class="active"><a href="#all" data-toggle="tab">Fashion</a></li>
                  </ul>
                  <!-- Tab panes -->
                  <div class="tab-content">
                    <!-- Start men product category -->

                    <div class="tab-pane fade in active" id="all">
                     
                      <ul class="aa-product-catg">
                      
                         {% for item in object_list %}
                         {% if item.category == 'FA' %} 
                        <li>
                          <figure>
                            <a class="aa-product-img" href="{{ item.get_absolute_url }}"><img src="{{ item.thumbnail.url }}" ></a>
                           
                              <figcaption>
                              <h4 class="aa-product-title"><a href="{{ item.get_absolute_url }}">{{ item.title }}</a></h4>
                              
                              {% if item.discount_price %} 
                              <span class="aa-product-price">
                              ${{ item.discount_price }}</span>

                              <span class="aa-product-price"><del>${{ item.price }}</del></span>
                              {% else %}
                              <span class="aa-product-price">
                              ${{ item.price }}</span>
                              {% endif %}

                            </figcaption>
                          </figure>                        
                          <div class="aa-product-hvr-content">                         
                          </div>
                          <!-- product badge -->
                          <span class="aa-badge aa-{{ item.get_label_display }}" href="#">{{ item.get_label_display }}</span>
                        </li>
                        {% endif %}
                       {% endfor %}                                                 
                      </ul>                       
                    </div>                                                   
                    </div>
                  </div>
              </div>              
          </div>
        </div>
        <section id="aa-subscribe">
    <div class="container">

      <div class="row">

        <div class="col-md-12">
          
          <div class="aa-subscribe-area">
           {% if is_paginated %}
            <div class="aa-product-catg-pagination">
              
                      <nav>
                      <ul class="pagination">
                        {% if page_obj.has_previous %}
                      <li>
                      <a href="?page={{ page_obj.previous_page_number }}" aria-label="Previous">
                      <span aria-hidden="true">&laquo;</span>
                      </a>
                       {% endif %}
                  </li>
                  <li><a href="?page={{ page_obj.number }}">{{ page_obj.number }}</a></li>                  
                  <li>
                    {% if page_obj.has_next %}
                    <a href="?page={{ page_obj.next_page_number }} " aria-label="Next">
                      <span aria-hidden="true">&raquo;</span>
                    </a>
                    {% endif %}
                  </li>
                  
                </ul>
              </nav>
            {% endif %}
            </div> 
            
           
          </div>
        </div>
      </div>
    </div>
  </section>
      </div>
    </div>
{% endblock content %}