Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Reorganize templates
akjanik186413e11199
diff --git a/saleor/product/views.py b/saleor/product/views.pyindex 4e129cf146..d8e004c619 100644--- a/saleor/product/views.py+++ b/saleor/product/views.py@@ -125,7 +125,7 @@ def category_index(request, path, category_id):now_sorted_by = get_now_sorted_by(product_filter)arg_sort_by = request.GET.get('sort_by')is_descending = arg_sort_by.startswith('-') if arg_sort_by else False- ctx = {'category': category, 'filter_set': product_filter,+ ctx = {'wrap': category, 'filter_set': product_filter,'products': products_and_availability,'products_paginated': products_paginated,'sort_by_choices': SORT_BY_FIELDS,@@ -147,7 +147,7 @@ def collection_index(request, pk):now_sorted_by = get_now_sorted_by(product_filter)arg_sort_by = request.GET.get('sort_by')is_descending = arg_sort_by.startswith('-') if arg_sort_by else False- ctx = {'collection': collection, 'filter_set': product_filter,+ ctx = {'wrap': collection, 'filter_set': product_filter,'products': products_and_availability,'products_paginated': products_paginated,'sort_by_choices': SORT_BY_FIELDS,diff --git a/saleor/static/scss/components/_filters.scss b/saleor/static/scss/components/_filters.scssindex ac28c89b59..d5b2657ff2 100644--- a/saleor/static/scss/components/_filters.scss+++ b/saleor/static/scss/components/_filters.scss@@ -57,8 +57,24 @@display: inline-block;}}+ &__title {+ padding: 0;+ padding-top: $global-padding*1;+ @include media-breakpoint-down(sm) {+ padding: $global-padding*3 0 $global-padding*2;+ }+ @media (max-width: 370px) {+ padding-top: 5rem;+ }+ h2 {+ font-size: 1.8rem;+ color: $body-color;+ padding-bottom: 0;+ }+ }&__categories {- padding: $global-padding*2 0;+ padding: 0;+ padding-bottom: $global-padding*2;@include media-breakpoint-down(sm) {padding: $global-padding*3 0 $global-padding*2;}diff --git a/templates/_items.html b/templates/_items.htmlnew file mode 100644index 0000000000..549d6ac251--- /dev/null+++ b/templates/_items.html@@ -0,0 +1,40 @@+{% load i18n %}+{% load staticfiles %}+{% load price_range from price_ranges %}+{% load product_first_image from product_images %}+{% load get_thumbnail from product_images %}++{% for product, availability in products %}+<div class="col-6 col-lg-3 product-list">+ <a href="{{ product.get_absolute_url }}" class="link--clean">+ <div class="text-center">+ <div>+ <img class="img-responsive"+ src="{% product_first_image product method="crop" size="255x255" %}"+ srcset="{% product_first_image product method="crop" size="255x255" %} 1x, {% product_first_image product method="crop" size="510x510" %} 2x"+ alt="">+ <span class="product-list-item-name" title="{{ product }}">{{ product }}</span>+ </div>++ <div class="panel-footer">+ {% if availability.available %}+ {% price_range availability.price_range %}+ {% if availability.discount %}+ {% if availability.price_range_undiscounted.min_price != availability.price_range.min_price %}+ <div class="product-list__sale">+ <svg data-src="{% static "images/sale-bg.svg" %}" />+ <span class="product-list__sale__text">+ {% comment %}Translators: Layout may break if character length is different than four.{% endcomment %}+ {% trans "Sale" context "Sale (discount) label for item in product list" %}+ </span>+ </div>+ {% endif %}+ {% endif %}+ {% else %}+ + {% endif %}+ </div>+ </div>+ </a>+</div>+{% endfor %}diff --git a/templates/category/category_filters.html b/templates/category/category_filters.htmlnew file mode 100644index 0000000000..dd8d91e21e--- /dev/null+++ b/templates/category/category_filters.html@@ -0,0 +1,13 @@+{% extends "../product_filters.html" %}++{% block title_tree %}+ <div class="product-filters__categories">+ <ul class="product-filters__categories__childs no-parent">+ {% for child in wrap.get_children %}+ <li>+ <a href="{{ child.get_absolute_url }}">{{ child.name }}</a>+ </li>+ {% endfor %}+ </ul>+ </div>+{% endblock title_tree %}diff --git a/templates/category/index.html b/templates/category/index.htmldeleted file mode 100644index 8b30257fd8..0000000000--- a/templates/category/index.html+++ /dev/null@@ -1,227 +0,0 @@-{% extends "base.html" %}-{% load bootstrap_pagination from bootstrap4 %}-{% load i18n %}-{% load shop %}-{% load staticfiles %}-{% load prices_i18n %}-{% load build_absolute_uri from urls %}-{% load placeholder %}--{% block footer_scripts %}- {{ block.super }}-{% endblock footer_scripts %}--{% block title %}{{ category }} — {{ block.super }}{% endblock %}--{% block meta_tags %}- <meta property="og:title" content="{{ category }}">- <meta property="og:description" content="{{ category.description }}">- <meta property="og:image" content="{% static "images/block1.png" %}">-- {% build_absolute_uri request=request location=category.get_absolute_url as category_url %}- <meta property="og:url" content="{{ category_url }}">- <link rel="canonical" href="{{ category_url }}?page={{ products_paginated.number }}">-- {% if products_paginated.has_previous %}- <link rel="prev" href="{{ category_url }}?page={{ products_paginated.previous_page_number }}">- {% endif %}-- {% if products_paginated.has_next %}- <link rel="next" href="{{ category_url }}?page={{ products_paginated.next_page_number }}">- {% endif %}-{% endblock meta_tags %}--{% block breadcrumb %}- {{ block.super }}- {% for breadcrumb in breadcrumbs %}- <li{% if forloop.last %} class="active"{% endif %}>- {% if not forloop.last %}- <a href="{{ breadcrumb.get_absolute_url }}">{{ breadcrumb }}</a>- {% else %}- <span>{{ breadcrumb }}</span>- {% endif %}- </li>- {% endfor %}-{% endblock breadcrumb %}--{% block content %}- <div id="category-page">- <div class="category-top">- <div class="row">- <div class="col-md-7">- <ul class="breadcrumbs list-unstyled d-none d-md-block">- <li><a href="{% url 'home' %}">{% trans "Home" context 'Category breadcrumbs home' %}</a></li>- {% for ancestor in category.get_ancestors %}- <li><a href='{{ ancestor.get_absolute_url }}'>{{ ancestor.name }}</a></li>- {% endfor %}- <li><a href='{{ category.get_absolute_url }}'>{{ category.name }}</a></li>- </ul>- </div>- <div class="col-md-5 filters-menu__wrapper">- <div class="row">- <div class="col-6 col-md-2 col-lg-6 filters-menu">- <span class="filters-menu__label d-md-none">Filters</span>- </div>- <div class="col-6 col-md-10 col-lg-6">- <div class="sort-by">- <div class="click-area d-none"></div>- <button class="btn btn-link">- <div>- <span>- {% if now_sorted_by == 'name' %}- {% blocktrans trimmed %}- Sort by: <b>name</b>- {% endblocktrans %}- {% elif now_sorted_by == 'price' %}- {% blocktrans trimmed %}- Sort by: <b>price</b>- {% endblocktrans %}- {% endif %}- </span>- <div class="sort-order-icon">- {% if is_descending %}- <svg data-src="{% static "images/arrow-down.svg" %}"/>- {% else %}- <svg data-src="{% static "images/arrow-up.svg" %}"/>- {% endif %}- </div>- </div>- </button>- <ul class="sort-list d-none">- {% for choice, label in sort_by_choices.items %}- <li>- <div class="row">- <div class="col-6">- {% trans 'Sort by' context 'Category page filters' %}: <strong>{{ label }}</strong>- </div>- <div class="col-6">- <div>- <a href="{% get_sort_by_url choice %}">- <span>{% trans 'ascending' context 'sort by option' %}</span>- <div class="sort-order-icon float-right">- <img class="lazyload lazypreload" data-src="{% static "images/arrow-up.svg" %}">- </div>- </a>- <a href="{% get_sort_by_url choice descending=True %}">- <span>{% trans 'descending' context 'sort by option' %}</span>- <div class="sort-order-icon float-right">- <img class="lazyload lazypreload" data-src="{% static "images/arrow-down.svg" %}">- </div>- </a>- </div>- </div>- </div>- </li>- {% endfor %}- </ul>- </div>- </div>- </div>- </div>- </div>- </div>- <div class="row">- <div class="col-md-4 col-lg-3">- <div class="product-filters">- <div class="product-filters__categories">- <h2>- <strong>{{ category.name }}</strong>- </h2>- <ul class="product-filters__categories__childs no-parent">- {% for child in category.get_children %}- <li>- <a href="{{ child.get_absolute_url }}">{{ child.name }}</a>- </li>- {% endfor %}- </ul>- </div>- </div>- <div class="filters-menu__body d-none d-md-block">- <h2>- {% trans 'Filters' context 'Filter heading title' %}- {% if filter.is_bound_unsorted %}- <a href=".">- <span class="clear-filters float-right">{% trans 'Clear filters' context 'Category page filters' %}</span>- </a>- {% endif %}- </h2>- <div class="product-filters">- <div class="product-filters__attributes" data-icon-up="{% static "images/chevron-up.svg" %}" data-icon-down="{% static "images/chevron-down.svg" %}">- <form method="get">- {% for field in filter_set.form %}- {% if field.name == 'sort_by' %}- {% comment %}- Field 'sort_by' is hidden because it is rendered in header.- This is required if you want to have sorting to be kept during further filtering.- {% endcomment %}- <input type="hidden" name="sort_by" value="{% if request.GET.sort_by %}{{ request.GET.sort_by }}{% endif %}">- {% elif field.name == 'price' %}- <div class="toggle-filter product-filters__price-range">- <h3 class="filter-label">- {{ field.label }}- <div class="collapse-filters-icon">- <img class="lazyload lazypreload" data-src="{% static "images/chevron-up.svg" %}">- </div>- </h3>- <div class="filter-form-field" style="display:block">- <div class="mb-3">- <input id="{{ field.auto_id }}_0" name="{{ field.name }}_0"- value="{% if field.value.0 %}{{ field.value.0 }}{% endif %}" type="number" min="0"- class="form-control d-inline"- placeholder="{% trans 'from' context 'Category price filter' %}"><span>-</span><input id="{{ field.auto_id }}_1" name="{{ field.name }}_1"- value="{% if field.value.1 %}{{ field.value.1 }}{% endif %}" type="number" min="0"- class="form-control d-inline" placeholder="{% trans 'to' context 'Category price filter' %}">- </div>- </div>- </div>- {% else %}- <div class="toggle-filter">- <h3 class="filter-label">- {{ field.label }}- <div class="collapse-filters-icon">- <img class="lazyload lazypreload" data-src="{% static "images/chevron-up.svg" %}">- </div>- </h3>- <div class="filter-form-field" style="display:block">- {{ field }}- </div>- </div>- {% endif %}- {% endfor %}- <div class="product-filters">- <button class="btn primary" type="submit">{% trans 'Update' context 'Category price filter' %}</button>- </div>- </form>- </div>- </div>- </div>- </div>- <div class="col-md-8 col-lg-9 category-list">- <div>- <div>- {% if products %}- <div class="row">- {% include "category/_items.html" with products=products %}- </div>- <div class="row">- <div class="m-auto">- {% if products_paginated.has_other_pages %}- {% bootstrap_pagination products_paginated extra=request.GET.urlencode %}- {% endif %}- </div>- </div>- {% else %}- <div class="row no-results">- <div class="col-12">- <svg data-src="{% static "images/no-results-bg.svg" %}" width="360" height="360"/>- <p>{% trans "Sorry, no matches found for your request." context "Search without results text" %}</p>- <p>{% trans "Try again or shop new arrivals." context "Search without results text" %}</p>- </div>- </div>- {% endif %}- </div>- </div>- </div>- </div>- </div>-{% endblock content %}diff --git a/templates/collection/index.html b/templates/collection/index.htmlindex 1716fb7db8..7754481e19 100644--- a/templates/collection/index.html+++ b/templates/collection/index.html@@ -1,226 +1,7 @@-{% extends "base.html" %}-{% load bootstrap_pagination from bootstrap4 %}+{% extends "product_list_base.html" %}{% load i18n %}-{% load shop %}{% load staticfiles %}-{% load prices_i18n %}-{% load build_absolute_uri from urls %}-{% block footer_scripts %}- {{ block.super }}-{% endblock footer_scripts %}--{% block title %}{{ collection }} — {{ block.super }}{% endblock %}--{% block meta_tags %}- <meta property="og:title" content="{{ collection }}">- <meta property="og:description" content="{{ collection.description }}">- <meta property="og:image" content="{% static "images/block1.png" %}">-- {% build_absolute_uri request=request location=collection.get_absolute_url as collection_url %}- <meta property="og:url" content="{{ collection_url }}">- <link rel="canonical" href="{{ collection_url }}?page={{ products_paginated.number }}">-- {% if products_paginated.has_previous %}- <link rel="prev" href="{{ collection_url }}?page={{ products_paginated.previous_page_number }}">- {% endif %}-- {% if products_paginated.has_next %}- <link rel="next" href="{{ collection_url }}?page={{ products_paginated.next_page_number }}">- {% endif %}-{% endblock meta_tags %}--{% block breadcrumb %}- {{ block.super }}- {% for breadcrumb in breadcrumbs %}- <li{% if forloop.last %} class="active"{% endif %}>- {% if not forloop.last %}- <a href="{{ breadcrumb.get_absolute_url }}">{{ breadcrumb }}</a>- {% else %}- <span>{{ breadcrumb }}</span>- {% endif %}- </li>- {% endfor %}-{% endblock breadcrumb %}--{% block content %}- <div id="collection-page">- <div class="collection-top">- <div class="row">- <div class="col-md-7">- <ul class="breadcrumbs list-unstyled d-none d-md-block">- <li><a href="{% url 'home' %}">{% trans "Home" context 'collection breadcrumbs home' %}</a></li>- {% for ancestor in collection.get_ancestors %}- <li><a href='{{ ancestor.get_absolute_url }}'>{{ ancestor.name }}</a></li>- {% endfor %}- <li><a href='{{ collection.get_absolute_url }}'>{{ collection.name }}</a></li>- </ul>- </div>- <div class="col-md-5 filters-menu__wrapper">- <div class="row">- <div class="col-6 col-md-2 col-lg-6 filters-menu">- <span class="filters-menu__label d-md-none">Filters</span>- </div>- <div class="col-6 col-md-10 col-lg-6">- <div class="sort-by">- <div class="click-area d-none"></div>- <button class="btn btn-link">- <div>- <span>- {% if now_sorted_by == 'name' %}- {% blocktrans trimmed %}- Sort by: <b>name</b>- {% endblocktrans %}- {% elif now_sorted_by == 'price' %}- {% blocktrans trimmed %}- Sort by: <b>price</b>- {% endblocktrans %}- {% endif %}- </span>- <div class="sort-order-icon">- {% if is_descending %}- <svg data-src="{% static "images/arrow-down.svg" %}"/>- {% else %}- <svg data-src="{% static "images/arrow-up.svg" %}"/>- {% endif %}- </div>- </div>- </button>- <ul class="sort-list d-none">- {% for choice, label in sort_by_choices.items %}- <li>- <div class="row">- <div class="col-6">- {% trans 'Sort by' context 'collection page filters' %}: <strong>{{ label }}</strong>- </div>- <div class="col-6">- <div>- <a href="{% get_sort_by_url choice %}">- <span>{% trans 'ascending' context 'sort by option' %}</span>- <div class="sort-order-icon float-right">- <img src="{% static "images/arrow-up.svg" %}">- </div>- </a>- <a href="{% get_sort_by_url choice descending=True %}">- <span>{% trans 'descending' context 'sort by option' %}</span>- <div class="sort-order-icon float-right">- <img src="{% static "images/arrow-down.svg" %}">- </div>- </a>- </div>- </div>- </div>- </li>- {% endfor %}- </ul>- </div>- </div>- </div>- </div>- </div>- </div>- <div class="row">- <div class="col-md-4 col-lg-3">- <div class="product-filters">- <div class="product-filters__collections">- <h2>- <strong>{{ collection.name }}</strong>- </h2>- <ul class="product-filters__collections__childs no-parent">- {% for child in collection.get_children %}- <li>- <a href="{{ child.get_absolute_url }}">{{ child.name }}</a>- </li>- {% endfor %}- </ul>- </div>- </div>- <div class="filters-menu__body d-none d-md-block">- <h2>- {% trans 'Filters' context 'Filter heading title' %}- {% if filter.is_bound_unsorted %}- <a href=".">- <span class="clear-filters float-right">{% trans 'Clear filters' context 'collection page filters' %}</span>- </a>- {% endif %}- </h2>- <div class="product-filters">- <div class="product-filters__attributes" data-icon-up="{% static "images/chevron-up.svg" %}" data-icon-down="{% static "images/chevron-down.svg" %}">- <form method="get">- {% for field in filter_set.form %}- {% if field.name == 'sort_by' %}- {% comment %}- Field 'sort_by' is hidden because it is rendered in header.- This is required if you want to have sorting to be kept during further filtering.- {% endcomment %}- <input type="hidden" name="sort_by" value="{% if request.GET.sort_by %}{{ request.GET.sort_by }}{% endif %}">- {% elif field.name == 'price' %}- <div class="toggle-filter product-filters__price-range">- <h3 class="filter-label">- {{ field.label }}- <div class="collapse-filters-icon">- <img src="{% static "images/chevron-up.svg" %}">- </div>- </h3>- <div class="filter-form-field" style="display:block">- <div class="mb-3">- <input id="{{ field.auto_id }}_0" name="{{ field.name }}_0"- value="{% if field.value.0 %}{{ field.value.0 }}{% endif %}" type="number" min="0"- class="form-control d-inline"- placeholder="{% trans 'from' context 'collection price filter' %}"><span>-</span><input id="{{ field.auto_id }}_1" name="{{ field.name }}_1"- value="{% if field.value.1 %}{{ field.value.1 }}{% endif %}" type="number" min="0"- class="form-control d-inline" placeholder="{% trans 'to' context 'collection price filter' %}">- </div>- </div>- </div>- {% else %}- <div class="toggle-filter">- <h3 class="filter-label">- {{ field.label }}- <div class="collapse-filters-icon">- <img src="{% static "images/chevron-up.svg" %}">- </div>- </h3>- <div class="filter-form-field" style="display:block">- {{ field }}- </div>- </div>- {% endif %}- {% endfor %}- <div class="product-filters">- <button class="btn primary" type="submit">{% trans 'Update' context 'collection price filter' %}</button>- </div>- </form>- </div>- </div>- </div>- </div>- <div class="col-md-8 col-lg-9 collection-list">- <div>- <div>- {% if products %}- <div class="row">- {% include "collection/_items.html" with products=products %}- </div>- <div class="row">- <div class="m-auto">- {% if products_paginated.has_other_pages %}- {% bootstrap_pagination products_paginated extra=request.GET.urlencode %}- {% endif %}- </div>- </div>- {% else %}- <div class="row no-results">- <div class="col-12">- <svg data-src="{% static "images/no-results-bg.svg" %}" width="360" height="360"/>- <p>{% trans "Sorry, no matches found for your request." context "Search without results text" %}</p>- <p>{% trans "Try again or shop new arrivals." context "Search without results text" %}</p>- </div>- </div>- {% endif %}- </div>- </div>- </div>- </div>- </div>-{% endblock content %}+{% block filters %}+ {% include "../product_filters.html" %}+{% endblock filters %}diff --git a/templates/product/_items.html b/templates/product/_items.htmlnew file mode 100644index 0000000000..549d6ac251--- /dev/null+++ b/templates/product/_items.html@@ -0,0 +1,40 @@+{% load i18n %}+{% load staticfiles %}+{% load price_range from price_ranges %}+{% load product_first_image from product_images %}+{% load get_thumbnail from product_images %}++{% for product, availability in products %}+<div class="col-6 col-lg-3 product-list">+ <a href="{{ product.get_absolute_url }}" class="link--clean">+ <div class="text-center">+ <div>+ <img class="img-responsive"+ src="{% product_first_image product method="crop" size="255x255" %}"+ srcset="{% product_first_image product method="crop" size="255x255" %} 1x, {% product_first_image product method="crop" size="510x510" %} 2x"+ alt="">+ <span class="product-list-item-name" title="{{ product }}">{{ product }}</span>+ </div>++ <div class="panel-footer">+ {% if availability.available %}+ {% price_range availability.price_range %}+ {% if availability.discount %}+ {% if availability.price_range_undiscounted.min_price != availability.price_range.min_price %}+ <div class="product-list__sale">+ <svg data-src="{% static "images/sale-bg.svg" %}" />+ <span class="product-list__sale__text">+ {% comment %}Translators: Layout may break if character length is different than four.{% endcomment %}+ {% trans "Sale" context "Sale (discount) label for item in product list" %}+ </span>+ </div>+ {% endif %}+ {% endif %}+ {% else %}+ + {% endif %}+ </div>+ </div>+ </a>+</div>+{% endfor %}diff --git a/templates/product_filters.html b/templates/product_filters.htmlnew file mode 100644index 0000000000..8fb6e535ce--- /dev/null+++ b/templates/product_filters.html@@ -0,0 +1,70 @@+{% load i18n %}+{% load staticfiles %}++<div class="product-filters">+ <div class="product-filters__title">+ <h2>+ <strong>{{ wrap }}</strong>+ </h2>+ {% block title_tree %}{% endblock title_tree %}+ </div>+</div>+<div class="filters-menu__body d-none d-md-block">+ <h2>+ {% trans 'Filters' context 'Filter heading title' %}+ {% if filter.is_bound_unsorted %}+ <a href=".">+ <span class="clear-filters float-right">{% trans 'Clear filters' context 'Product list page filters' %}</span>+ </a>+ {% endif %}+ </h2>+ <div class="product-filters">+ <div class="product-filters__attributes" data-icon-up="{% static "images/chevron-up.svg" %}" data-icon-down="{% static "images/chevron-down.svg" %}">+ <form method="get">+ {% for field in filter_set.form %}+ {% if field.name == 'sort_by' %}+ {% comment %}+ Field 'sort_by' is hidden because it is rendered in header.+ This is required if you want to have sorting to be kept during further filtering.+ {% endcomment %}+ <input type="hidden" name="sort_by" value="{% if request.GET.sort_by %}{{ request.GET.sort_by }}{% endif %}">+ {% elif field.name == 'price' %}+ <div class="toggle-filter product-filters__price-range">+ <h3 class="filter-label">+ {{ field.label }}+ <div class="collapse-filters-icon">+ <img src="{% static "images/chevron-up.svg" %}">+ </div>+ </h3>+ <div class="filter-form-field" style="display:block">+ <div class="mb-3">+ <input id="{{ field.auto_id }}_0" name="{{ field.name }}_0"+ value="{% if field.value.0 %}{{ field.value.0 }}{% endif %}" type="number" min="0"+ class="form-control d-inline"+ placeholder="{% trans 'from' context 'Product price filter' %}"><span>-</span><input id="{{ field.auto_id }}_1" name="{{ field.name }}_1"+ value="{% if field.value.1 %}{{ field.value.1 }}{% endif %}" type="number" min="0"+ class="form-control d-inline" placeholder="{% trans 'to' context 'Product price filter' %}">+ </div>+ </div>+ </div>+ {% else %}+ <div class="toggle-filter">+ <h3 class="filter-label">+ {{ field.label }}+ <div class="collapse-filters-icon">+ <img src="{% static "images/chevron-up.svg" %}">+ </div>+ </h3>+ <div class="filter-form-field" style="display:block">+ {{ field }}+ </div>+ </div>+ {% endif %}+ {% endfor %}+ <div class="product-filters">+ <button class="btn primary" type="submit">{% trans 'Update' context 'Product price filter' %}</button>+ </div>+ </form>+ </div>+ </div>+</div>diff --git a/templates/product_list_base.html b/templates/product_list_base.htmlnew file mode 100644index 0000000000..f7015d8cd2--- /dev/null+++ b/templates/product_list_base.html@@ -0,0 +1,143 @@+{% extends "base.html" %}+{% load bootstrap_pagination from bootstrap4 %}+{% load i18n %}+{% load shop %}+{% load staticfiles %}+{% load prices_i18n %}+{% load build_absolute_uri from urls %}++{% block footer_scripts %}+ {{ block.super }}+{% endblock footer_scripts %}++{% block title %}{{ wrap }} — {{ block.super }}{% endblock %}++{% block meta_tags %}+ <meta property="og:title" content="{{ wrap }}">+ <meta property="og:description" content="{{ wrap.description }}">+ <meta property="og:image" content="{% static "images/block1.png" %}">++ {% build_absolute_uri request=request location=wrap.get_absolute_url as wrap_url %}+ <meta property="og:url" content="{{ wrap_url }}">+ <link rel="canonical" href="{{ wrap_url }}?page={{ products_paginated.number }}">++ {% if products_paginated.has_previous %}+ <link rel="prev" href="{{ wrap_url }}?page={{ products_paginated.previous_page_number }}">+ {% endif %}++ {% if products_paginated.has_next %}+ <link rel="next" href="{{ wrap_url }}?page={{ products_paginated.next_page_number }}">+ {% endif %}+{% endblock meta_tags %}+++{% block content %}+ <div id="product-list-page">+ <div class="product-list-top">+ <div class="row">+ <div class="col-md-7">+ <ul class="breadcrumbs list-unstyled d-none d-md-block">+ <li><a href="{% url 'home' %}">{% trans "Home" context 'Category breadcrumbs home' %}</a></li>+ {% for ancestor in wrap.get_ancestors %}+ <li><a href='{{ ancestor.get_absolute_url }}'>{{ ancestor.name }}</a></li>+ {% endfor %}+ <li><a href='{{ wrap.get_absolute_url }}'>{{ wrap.name }}</a></li>+ </ul>+ </div>+ <div class="col-md-5 filters-menu__wrapper">+ <div class="row">+ <div class="col-6 col-md-2 col-lg-6 filters-menu">+ <span class="filters-menu__label d-md-none">Filters</span>+ </div>+ <div class="col-6 col-md-10 col-lg-6">+ <div class="sort-by">+ <div class="click-area d-none"></div>+ <button class="btn btn-link">+ <div>+ <span>+ {% if now_sorted_by == 'name' %}+ {% blocktrans trimmed %}+ Sort by: <b>name</b>+ {% endblocktrans %}+ {% elif now_sorted_by == 'price' %}+ {% blocktrans trimmed %}+ Sort by: <b>price</b>+ {% endblocktrans %}+ {% endif %}+ </span>+ <div class="sort-order-icon">+ {% if is_descending %}+ <svg data-src="{% static "images/arrow-down.svg" %}"/>+ {% else %}+ <svg data-src="{% static "images/arrow-up.svg" %}"/>+ {% endif %}+ </div>+ </div>+ </button>+ <ul class="sort-list d-none">+ {% for choice, label in sort_by_choices.items %}+ <li>+ <div class="row">+ <div class="col-6">+ {% trans 'Sort by' context 'Product list filters' %}: <strong>{{ label }}</strong>+ </div>+ <div class="col-6">+ <div>+ <a href="{% get_sort_by_url choice %}">+ <span>{% trans 'ascending' context 'sort by option' %}</span>+ <div class="sort-order-icon float-right">+ <img src="{% static "images/arrow-up.svg" %}">+ </div>+ </a>+ <a href="{% get_sort_by_url choice descending=True %}">+ <span>{% trans 'descending' context 'sort by option' %}</span>+ <div class="sort-order-icon float-right">+ <img src="{% static "images/arrow-down.svg" %}">+ </div>+ </a>+ </div>+ </div>+ </div>+ </li>+ {% endfor %}+ </ul>+ </div>+ </div>+ </div>+ </div>+ </div>+ </div>+ <div class="row">+ <div class="col-md-4 col-lg-3">+ {% block filters %}{% endblock filters %}+ </div>+ <div class="col-md-8 col-lg-9 product-list">+ <div>+ <div>+ {% if products %}+ <div class="row">+ {% include "_items.html" with products=products %}+ </div>+ <div class="row">+ <div class="m-auto">+ {% if products_paginated.has_other_pages %}+ {% bootstrap_pagination products_paginated extra=request.GET.urlencode %}+ {% endif %}+ </div>+ </div>+ {% else %}+ <div class="row no-results">+ <div class="col-12">+ <svg data-src="{% static "images/no-results-bg.svg" %}" width="360" height="360"/>+ <p>{% trans "Sorry, no matches found for your request." context "Search without results text" %}</p>+ <p>{% trans "Try again or shop new arrivals." context "Search without results text" %}</p>+ </div>+ </div>+ {% endif %}+ </div>+ </div>+ </div>++ </div>+ </div>+{% endblock content %}