<commit_before>{% extends 'catalog-layout.html' %}

{% block title %}
  Catalog Search
{% endblock %}

{% block extra_head %}
  <link type="text/css" rel="stylesheet"
        href="/extern/lightslider-1.1.6/dist/css/lightslider.min.css" />
  <script src="/extern/lightslider-1.1.6/dist/js/lightslider.min.js"></script>
{% endblock %}

{% block catalog_sidebar %}
{% endblock %}

{% block catalog_crumb %}
{% endblock %}

{% block catalog_width "12" %}

{% block catalog_content %}
  {# Error(s) #}
  {% if errors|length %}
    {% for e in errors %}
      <div class="alert alert-danger">
        {{ e }}
      </div>
    {% endfor %}
  {% endif %}

  {# Product(s) #}
  {% if products|length %}
    <ul id="product-slider">
      {% for p in products %}
        {% set slug = path_for('catalog') ~ '/' ~ p.full_slug %}
        <li>
          <a href="{{ slug }}" class="thumbnail">
            <div class="caption">
              <small>{{ p.name }}</small>
            </div>
            {% if p.media|length %}
              {% set i = p.media[0] %}
              <img class="media-object"
                   style="width:120px; max-width: 120px"
                   src="{{ i.thumbnail }}"
                   alt="{{ i.alt_text }}">
            {% endif %}
          </a>
        </li>
      {% endfor %}
    </ul>
  {% endif %}

<script>
$(function() {
  $('#product-slider').lightSlider({
    item: 6,
    auto: false
  });
});
</script>

  {# Item(s) #}
  {% if items|length %}
    {% include 'catalog-items.twig' %}
  {% endif %}

  {% if not items|length and not products|length %}
    <p class="lead">
      <strong>No results found.</strong>
      Nothing was found for those search parameters.
      {% if not (q matches '/active:0/') %}
        <a href="{{ current_path(true) ~ ' active:0' }}">Try again with inactive items.</a>
      {% endif %}
    </p>
  {% endif %}
{% endblock %}
<commit_msg>Move product results to sidebar<commit_after>{% extends 'catalog-layout.html' %}

{% block title %}
  Catalog Search
{% endblock %}

{% block extra_head %}
  <link type="text/css" rel="stylesheet"
        href="/extern/lightslider-1.1.6/dist/css/lightslider.min.css" />
  <script src="/extern/lightslider-1.1.6/dist/js/lightslider.min.js"></script>
{% endblock %}

{% block catalog_sidebar %}
  {# Product(s) #}
  {% if products|length %}
    <div class="col-md-3 col-md-pull-9">
      {% for p in products %}
        {% set slug = path_for('catalog') ~ '/' ~ p.full_slug %}
        <figure class="thumbnail is-square">
          <a href="{{ slug }}">
            {% if p.media|length %}
              {% set i = p.media[0] %}
              <img src="{{ i.thumbnail }}" alt="{{ i.alt_text }}">
            {% endif %}
            <div class="caption">
              <small>{{ p.name }}</small>
            </div>
          </a>
        </figure>
      {% endfor %}
    </div>
  {% endif %}
{% endblock %}

{% block catalog_crumb %}
{% endblock %}

{% block catalog_width products|length ? "9 col-md-push-3" : "12" %}

{% block catalog_content %}
  {# Error(s) #}
  {% if errors|length %}
    {% for e in errors %}
      <div class="alert alert-danger">
        {{ e }}
      </div>
    {% endfor %}
  {% endif %}

  {# Item(s) #}
  {% if items|length %}
    {% include 'catalog-items.twig' %}
  {% endif %}

  {% if not items|length and not products|length %}
    <p class="lead">
      <strong>No results found.</strong>
      Nothing was found for those search parameters.
      {% if not (q matches '/active:0/') %}
        <a href="{{ current_path(true) ~ ' active:0' }}">Try again with inactive items.</a>
      {% endif %}
    </p>
  {% endif %}
{% endblock %}

{'fraction_non_alphanumeric': 0.19782312925170067, 'fraction_numerical': 0.008979591836734694, 'mean_word_length': 2.171699741156169, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 49, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3841751', 'n_tokens_mistral': 1348, 'n_tokens_neox': 1184, 'n_words': 269}