Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Product list image HTML and styling

Pacu2416ee64437c9
diff --git a/saleor/static/scss/layouts/_product-list.scss b/saleor/static/scss/layouts/_product-list.scss
index 93ddae8012..db6e7abe4a 100644
--- a/saleor/static/scss/layouts/_product-list.scss
+++ b/saleor/static/scss/layouts/_product-list.scss
@@ -1,3 +1,16 @@
+#product-list-image {
+ background-position: top;
+ background-repeat: repeat-x;
+ background-size: cover;
+ @include media-breakpoint-down(sm) {
+ padding: 17 * $global-padding 0 0;
+ margin-top: -1 * $global-margin;
+ }
+ @include media-breakpoint-up(md) {
+ padding: 20 * $global-padding 0 0;
+ }
+}
+
.product-list {
text-align: center;
margin-bottom: $global-margin * 2;
diff --git a/templates/base.html b/templates/base.html
index 42b039ca4f..7cef65d93f 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -154,9 +154,8 @@
</div>
</header>
{% endblock %}
-{% block topcontent %}
-{% endblock topcontent %}
<div class="container maincontent">
+ {% block topcontent %}{% endblock topcontent %}
{% if messages %}
{% for message in messages %}
<div class="alert{% if message.tags %} alert-{{ message.tags }}{% endif %}">
diff --git a/templates/product/product_list_base.html b/templates/product/product_list_base.html
index 4637396e82..799300d042 100644
--- a/templates/product/product_list_base.html
+++ b/templates/product/product_list_base.html
@@ -100,7 +100,7 @@
{% block topcontent %}
{% if object.background_image %}
- <div class="row" id="category-image" style="background-image: url('{{ object.background_image.url }}')"></div>
+ <div class="row" id="product-list-image" style="background-image: url('{{ object.background_image.url }}')"></div>
{% endif %}
{% endblock topcontent %}