From eaa5df088ab80759cd9fee82840eef0e327bafc4 Mon Sep 17 00:00:00 2001 From: Aditya Anand Date: Tue, 23 Apr 2019 00:27:05 +0530 Subject: [PATCH] - enables filters on mobile with minimize + maximize option for both explorer + hackathon - fix results not found img margin - code refactor Fixes: https://github.com/gitcoinco/web/issues/4199 --- app/assets/v2/css/dashboard.css | 1 - app/assets/v2/css/sidebar_search.css | 13 +++++++++++-- app/assets/v2/js/pages/dashboard.js | 18 ++++++++++++++++++ app/dashboard/templates/dashboard/index.html | 4 +++- .../templates/dashboard/sidebar_search.html | 10 ++++++++++ .../dashboard/sidebar_search_hackathon.html | 17 +++++++++++------ 6 files changed, 53 insertions(+), 10 deletions(-) diff --git a/app/assets/v2/css/dashboard.css b/app/assets/v2/css/dashboard.css index b4e3f3f8f6f..2562aa33fb8 100644 --- a/app/assets/v2/css/dashboard.css +++ b/app/assets/v2/css/dashboard.css @@ -191,7 +191,6 @@ body { } @media (max-width: 991.98px) { - .bounty_row { padding-left: 1rem; padding-right: 1rem; diff --git a/app/assets/v2/css/sidebar_search.css b/app/assets/v2/css/sidebar_search.css index a43c6c65796..552ef18058d 100644 --- a/app/assets/v2/css/sidebar_search.css +++ b/app/assets/v2/css/sidebar_search.css @@ -15,6 +15,11 @@ font-size: 0.8rem; } +#expand, +#minimize { + display: none; +} + .close-icon { position: absolute; top: 13px; @@ -87,11 +92,15 @@ } @media (max-width: 991.98px) { - #sidebar_container form, - .search-history { + #sidebar_container form { + height: 0; display: none; } + #expand { + display: inherit; + } + .search_bar div { padding-right: 15px !important; } diff --git a/app/assets/v2/js/pages/dashboard.js b/app/assets/v2/js/pages/dashboard.js index d8b088c6da6..c8662a2c1ba 100644 --- a/app/assets/v2/js/pages/dashboard.js +++ b/app/assets/v2/js/pages/dashboard.js @@ -670,6 +670,24 @@ var resetFilters = function(resetKeyword) { $(document).ready(function() { + $('#expand').on('click', () => { + $('#expand').hide(); + $('#minimize').show(); + $('#sidebar_container form').css({ + 'height': 'auto', + 'display': 'inherit' + }); + }); + + $('#minimize').on('click', () => { + $('#minimize').hide(); + $('#expand').show(); + $('#sidebar_container form').css({ + 'height': 0, + 'display': 'none' + }); + }); + // Sort select menu $('#sort_option').selectmenu({ select: function(event, ui) { diff --git a/app/dashboard/templates/dashboard/index.html b/app/dashboard/templates/dashboard/index.html index 9b5b905d76d..bf703e42e88 100644 --- a/app/dashboard/templates/dashboard/index.html +++ b/app/dashboard/templates/dashboard/index.html @@ -78,7 +78,7 @@
- + +

+ {% trans "Expand Filter" %} + +

+

+ {% trans "Minimize Filter" %} + +

+
diff --git a/app/dashboard/templates/dashboard/sidebar_search_hackathon.html b/app/dashboard/templates/dashboard/sidebar_search_hackathon.html index 90a82eab8cc..65bc0420a14 100644 --- a/app/dashboard/templates/dashboard/sidebar_search_hackathon.html +++ b/app/dashboard/templates/dashboard/sidebar_search_hackathon.html @@ -24,9 +24,18 @@ .sidebar_search { padding: 20px 3rem; } + - \ No newline at end of file