aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordominik-zeglen <flesz3@o2.pl>2017-10-03 10:32:52 +0200
committerdominik-zeglen <flesz3@o2.pl>2017-10-03 10:32:52 +0200
commitcb60a3875bafe507471b174fc7670295232d8a75 (patch)
treef4cc2a90418b3c37d1ff4fa9ad3f12a1f943c631
parent10f3acc2b219d551189fa9adda006fa605b88d70 (diff)
downloadsaleor-frontend-cb60a3875bafe507471b174fc7670295232d8a75.tar.gz
saleor-frontend-cb60a3875bafe507471b174fc7670295232d8a75.tar.bz2
saleor-frontend-cb60a3875bafe507471b174fc7670295232d8a75.zip
Add mobile filter menu opening
-rw-r--r--saleor/static/js/storefront.js13
-rw-r--r--saleor/static/scss/components/_header.scss2
-rw-r--r--templates/category/index.html4
3 files changed, 16 insertions, 3 deletions
diff --git a/saleor/static/js/storefront.js b/saleor/static/js/storefront.js
index a7329a4b..65846be2 100644
--- a/saleor/static/js/storefront.js
+++ b/saleor/static/js/storefront.js
@@ -139,6 +139,19 @@ $(document).ready((e) => {
});
});
+// Mobile filters menu
+
+$(document).ready((e) => {
+ $('.filters-menu').on('click', (e) => {
+ const t = $('.filters-menu__body');
+ if(t.hasClass('d-none')) {
+ t.removeClass('d-none');
+ } else {
+ t.addClass('d-none');
+ }
+ });
+});
+
// Input Passwords
let $inputPassword = $('input[type=password]');
diff --git a/saleor/static/scss/components/_header.scss b/saleor/static/scss/components/_header.scss
index 0df22375..d97e1fc1 100644
--- a/saleor/static/scss/components/_header.scss
+++ b/saleor/static/scss/components/_header.scss
@@ -202,7 +202,7 @@
background-color: $white;
padding-left: 0;
padding-right: $global-padding;
- padding-top: $global-padding * 2;
+ padding-top: $global-padding * 5;
transition: 0.3s ease-in-out;
ul {
text-align: left;
diff --git a/templates/category/index.html b/templates/category/index.html
index 39c4e88a..872406b9 100644
--- a/templates/category/index.html
+++ b/templates/category/index.html
@@ -42,7 +42,7 @@
<div class="col-md-5">
<div class="row">
<div class="col-6 col-md-2 col-lg-6 filters-menu">
-
+ <span class="filters-menu__label d-sm-none">Filters</span>
</div>
<div class="col-6 col-md-10 col-lg-6">
<div class="sort-by">
@@ -136,7 +136,7 @@
</ul>
</div>
</div>
- <div>
+ <div class="filters-menu__body d-none">
<h2>
{% trans 'Filters' context 'Filter heading title' %}
<a href="?">