Skip to content

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

Adjust no-results page styles to product list in category page

Marcin Gębalaf77f59defdf0
diff --git a/saleor/static/js/components/categoryPage/NoResults.js b/saleor/static/js/components/categoryPage/NoResults.js
index 9d9784f86a..d0fad03ccd 100644
--- a/saleor/static/js/components/categoryPage/NoResults.js
+++ b/saleor/static/js/components/categoryPage/NoResults.js
@@ -4,9 +4,12 @@ import noResultsImg from '../../../img/pirate.svg';
const NoResults = () => {
return (
- <div>
- <img src={noResultsImg} />
- <p>Sorry, no matches found for your request. Try again or shop new arrivals</p>
+ <div className="no-results">
+ <div className="col-12">
+ <img src={noResultsImg} />
+ <p>Sorry, no matches found for your request.</p>
+ <p>Try again or shop new arrivals.</p>
+ </div>
</div>
);
};
diff --git a/saleor/static/scss/storefront/components/_no-results.scss b/saleor/static/scss/storefront/components/_no-results.scss
new file mode 100644
index 0000000000..29a8ca58bd
--- /dev/null
+++ b/saleor/static/scss/storefront/components/_no-results.scss
@@ -0,0 +1,25 @@
+.no-results {
+ max-width: 30rem;
+ margin: auto;
+ h2 {
+ text-align: center;
+ padding-top: $global-padding;
+ font-size: 2.5rem;
+ @include media-breakpoint-down(sm) {
+ font-size: 1.5rem
+ }
+ }
+ img {
+ width: 100%;
+ padding-top: $global-padding*2;
+ padding-bottom: $global-padding*2;
+ }
+ p {
+ text-align: center;
+ margin-bottom: 0;
+ font-size: 1.5rem;
+ @include media-breakpoint-down(sm) {
+ font-size: 1rem
+ }
+ }
+}
diff --git a/saleor/static/scss/storefront/components/_search.scss b/saleor/static/scss/storefront/components/_search.scss
deleted file mode 100644
index 7956eeb9a9..0000000000
--- a/saleor/static/scss/storefront/components/_search.scss
+++ /dev/null
@@ -1,28 +0,0 @@
-.search_results {
- .no-results {
- max-width: 30rem;
- margin: auto;
- h2 {
- text-align: center;
- padding-top: $global-padding;
- padding-bottom: $global-padding/2;
- font-size: 2.5rem;
- @include media-breakpoint-down(sm) {
- font-size: 1.5rem
- }
- }
- img {
- width: 100%;
- padding-bottom: $global-padding*2;
- }
- p {
- text-align: center;
- margin-bottom: 0;
- font-size: 1.5rem;
- @include media-breakpoint-down(sm) {
- font-size: 1rem
- }
- }
-
- }
-}
\ No newline at end of file
diff --git a/saleor/static/scss/storefront/storefront.scss b/saleor/static/scss/storefront/storefront.scss
index 486f78f9b5..332c0bc723 100644
--- a/saleor/static/scss/storefront/storefront.scss
+++ b/saleor/static/scss/storefront/storefront.scss
@@ -19,4 +19,4 @@
@import "components/checkout";
@import "components/order-details";
@import "components/category-page";
-@import "components/search";
\ No newline at end of file
+@import "components/no-results";
\ No newline at end of file
diff --git a/templates/search/results.html b/templates/search/results.html
index b12318933e..48a0dc3727 100644
--- a/templates/search/results.html
+++ b/templates/search/results.html
@@ -20,7 +20,7 @@
{% endblock breadcrumb %}
{% block content %}
- <div class="row home__featured search_results">
+ <div class="row home__featured">
<div class="col-sm-12">
{% if query and results %}
<div class="row">