diff --git a/src/main/resources/static/js/searchBar.js b/src/main/resources/static/js/searchBar.js index ebce210a4fbe540bbc37b9e7735226c86aede06e..3ed6bb797099db2c37e527dd0ecc8c1f0064710d 100644 --- a/src/main/resources/static/js/searchBar.js +++ b/src/main/resources/static/js/searchBar.js @@ -57,6 +57,11 @@ function doSearch(fromNextPageBtn){ if(!fromNextPageBtn){ document.getElementById("business_card_container").innerHTML = ""; } + if(data["shops"].length == 0){ + document.getElementById("searchText").style.display="block"; + }else{ + document.getElementById("searchText").style.display="none"; + } for(let shop of data["shops"]){ addShop(shop); } diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index 041a8e83fd9889a493a376d54c50066a4192ba85..c8c30de798375f183e061dfe2ed35b28d231620b 100644 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -81,6 +81,7 @@ <div class="is-full-width is-flex is-justify-content-center is-align-items-center" id="loadMoreBtn" style="display: none!important;;"> <a onclick="loadNextPage()">Load More</a> </div> + <h1 class="subtitle is-5 is-full-width" style="text-align: center;display: none;" id="searchText">You've filtered too far!</h1> </div> <div th:if="${selectCategories}" class="modal is-active">