<commit_before>{% extends "base.html" %}

{% load bootstrap_form from bootstrap3 %}
{% load i18n %}
{% load gross from prices_i18n %}
{% load markdown from markdown %}
{% load price_range from price_ranges %}
{% load static from staticfiles %}

{% block title %}{{ product }} — {{ block.super }}{% endblock %}

{% block breadcrumb %}
    <ul class="breadcrumbs list-unstyled hidden-sm-down">
        <li><a href="/">{% trans "Home" %}</a></li>
        {% with product.get_first_category as category %}
            {% if category %}
                <li><a href="{{ category.get_absolute_url }}">{{ category }}</a></li>
            {% endif %}
        {% endwith %}
        <li><a href="{{ product.get_absolute_url }}">{{ product }}</a></li>
    </ul>
{% endblock breadcrumb %}

{% block content %}
    {% if not is_visible %}
        <div class="alert alert-warning" role="alert">
            {% blocktrans with date=product.available_on|date %}<strong>Warning!</strong> You are previewing a product that will become visible on <strong>{{ date }}</strong>.{% endblocktrans %}
        </div>
    {% endif %}
    <div itemscope itemtype="http://schema.org/Product">
        <div class="row product">
            <div class="col-xs-12 col-md-5 float-md-right text-xs-center text-md-left">
              <h1 itemprop="name" class="product__info__name">
                  {{ product }}
              </h1>
              {% if product.is_in_stock %}
                  <h2 itemprop="offers" class="product__info__price" itemscope itemtype="http://schema.org/Offer">
                      <span>{% price_range price_range %}</span>
                      {% if discount %}
                          <small class="product__info__price__undiscounted">{% gross undiscounted_price_range.min_price html=True %}</small>
                      {% endif %}
                      {% if local_price_range %}
                          <br>
                          <small>
                              &asymp;
                              {% gross local_price_range.min_price html=True %}
                          </small>
                      {% endif %}
                  </h2>
              {% endif %}
            </div>
            <div class="col-md-7 col-xs-12 product__gallery">
              {% with images=product.images.all %}
                {% if images %}
                <div id="carousel-example-generic" class="carousel slide">
                  <ol class="carousel-indicators hidden-sm-down">
                    {% for image in images %}
                      {% if images|length > 1 %}
                        <li data-target="#carousel-example-generic" data-slide-to="{{ forloop.counter0 }}">
                          <img src="{{ image.image.crop.60x60 }}" alt="">
                        </li>
                      {% endif %}
                    {% endfor %}
                  </ol>
                  <div class="carousel-inner" role="listbox">
                    {% for image in images %}
                    <div class="carousel-item{% if forloop.first %} active{% endif %}">
                      <img src="{{ image.image.crop.750x750 }}" alt="">
                    </div>
                    {% endfor %}
                  </div>
                  {% if images|length > 1 %}
                    <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
                      <img class="icon-next" src="{% static "img/gallery-arrow.svg" %}">
                    </a>
                    <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
                      <img class="icon-next" src="{% static "img/gallery-arrow.svg" %}">
                    </a>
                  {% endif %}
                </div>
                {% else %}
                  <img src="{% static 'images/product-image-placeholder.png' %}" alt="" class="img-fluid">
                {% endif %}
              {% endwith %}
            </div>
            <div class="col-md-5 product__info">
                {% if is_visible and product.is_in_stock %}
                    {% block orderform %}
                    <form role="form" class="product-form form-vertical" method="post"
                     action="{% url 'cart:add-to-cart' product_id=product.pk %}?next={{ product.get_absolute_url }}" novalidate>
                        {% csrf_token %}
                        {% bootstrap_form form %}

                        <div class="form-group">
                            <button class="btn primary">
                                {% trans "Add to cart" %}
                            </button>
                        </div>
                    </form>
                    {% endblock %}
                {% else %}
                    <p class="alert alert-warning">{% trans "This product is currently <strong>unavailable</strong>." %}</p>
                {% endif %}

                <hr>

                <div itemprop="product__info__description">
                    <p><strong>{% trans "Description" %}</strong></p>
                    {{ product.description|markdown }}
                </div>

            </div>
        </div>
    </div>
{% endblock content %}
<commit_msg>Fix grid on product page<commit_after>{% extends "base.html" %}

{% load bootstrap_form from bootstrap3 %}
{% load i18n %}
{% load gross from prices_i18n %}
{% load markdown from markdown %}
{% load price_range from price_ranges %}
{% load static from staticfiles %}

{% block title %}{{ product }} — {{ block.super }}{% endblock %}

{% block breadcrumb %}
    <ul class="breadcrumbs list-unstyled hidden-sm-down">
        <li><a href="/">{% trans "Home" %}</a></li>
        {% with product.get_first_category as category %}
            {% if category %}
                <li><a href="{{ category.get_absolute_url }}">{{ category }}</a></li>
            {% endif %}
        {% endwith %}
        <li><a href="{{ product.get_absolute_url }}">{{ product }}</a></li>
    </ul>
{% endblock breadcrumb %}

{% block content %}
    {% if not is_visible %}
        <div class="alert alert-warning" role="alert">
            {% blocktrans with date=product.available_on|date %}<strong>Warning!</strong> You are previewing a product that will become visible on <strong>{{ date }}</strong>.{% endblocktrans %}
        </div>
    {% endif %}
    <div itemscope itemtype="http://schema.org/Product">
        <div class="row product">
            <div class="col-xs-12 col-md-5 float-md-right text-xs-center text-md-left">
              <h1 itemprop="name" class="product__info__name">
                  {{ product }}
              </h1>
              {% if product.is_in_stock %}
                  <h2 itemprop="offers" class="product__info__price" itemscope itemtype="http://schema.org/Offer">
                      <span>{% price_range price_range %}</span>
                      {% if discount %}
                          <small class="product__info__price__undiscounted">{% gross undiscounted_price_range.min_price html=True %}</small>
                      {% endif %}
                      {% if local_price_range %}
                          <br>
                          <small>
                              &asymp;
                              {% gross local_price_range.min_price html=True %}
                          </small>
                      {% endif %}
                  </h2>
              {% endif %}
            </div>
            <div class="col-md-7 col-xs-12 product__gallery">
              {% with images=product.images.all %}
                {% if images %}
                <div id="carousel-example-generic" class="carousel slide">
                  <ol class="carousel-indicators hidden-sm-down">
                    {% for image in images %}
                      {% if images|length > 1 %}
                        <li data-target="#carousel-example-generic" data-slide-to="{{ forloop.counter0 }}">
                          <img src="{{ image.image.crop.60x60 }}" alt="">
                        </li>
                      {% endif %}
                    {% endfor %}
                  </ol>
                  <div class="carousel-inner" role="listbox">
                    {% for image in images %}
                    <div class="carousel-item{% if forloop.first %} active{% endif %}">
                      <img src="{{ image.image.crop.750x750 }}" alt="">
                    </div>
                    {% endfor %}
                  </div>
                  {% if images|length > 1 %}
                    <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
                      <img class="icon-next" src="{% static "img/gallery-arrow.svg" %}">
                    </a>
                    <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
                      <img class="icon-next" src="{% static "img/gallery-arrow.svg" %}">
                    </a>
                  {% endif %}
                </div>
                {% else %}
                  <img src="{% static 'images/product-image-placeholder.png' %}" alt="" class="img-fluid">
                {% endif %}
              {% endwith %}
            </div>
            <div class="col-md-5 col-xs-12 product__info">
                {% if is_visible and product.is_in_stock %}
                    {% block orderform %}
                    <form role="form" class="product-form form-vertical" method="post"
                     action="{% url 'cart:add-to-cart' product_id=product.pk %}?next={{ product.get_absolute_url }}" novalidate>
                        {% csrf_token %}
                        {% bootstrap_form form %}

                        <div class="form-group">
                            <button class="btn primary">
                                {% trans "Add to cart" %}
                            </button>
                        </div>
                    </form>
                    {% endblock %}
                {% else %}
                    <p class="alert alert-warning">{% trans "This product is currently <strong>unavailable</strong>." %}</p>
                {% endif %}

                <hr>

                <div itemprop="product__info__description">
                    <p><strong>{% trans "Description" %}</strong></p>
                    {{ product.description|markdown }}
                </div>

            </div>
        </div>
    </div>
{% endblock content %}

{'fraction_non_alphanumeric': 0.14687766511892353, 'fraction_numerical': 0.005685587036861556, 'mean_word_length': 1.391028545536928, 'pattern_counts': {'":': 0, '<': 157, '<?xml version=': 0, '>': 161, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6327049', 'n_tokens_mistral': 3049, 'n_tokens_neox': 2641, 'n_words': 601}