-
-
Notifications
You must be signed in to change notification settings - Fork 776
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor no results message component 4903 (#5298)
* leadership info change * profile picture add * noResultsFilter works * noresultsfilter works * noresultsfilter works * current project function add * rename no result filter * fix format with current-guides * revert back current-projects * fix format on toolkit.html * current-guides add no results message element * fix format * fix capitalization * checking other branch * search function added back * change comment for function
- Loading branch information
Showing
7 changed files
with
53 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
function noResultsMessageComponent(filterParams, textColor) { | ||
let filterList = `` | ||
for (let key in filterParams) { | ||
if (filterParams[key].length) { | ||
for (let i = 0; i < filterParams[key].length; i++) { | ||
filterList += `<p>"<span class='toolkit-red'>${key}: ${filterParams[key][i]}</span>"</p>` | ||
} | ||
} | ||
} | ||
|
||
const noResultsMsgEle = document.querySelector(".no-results-message") | ||
noResultsMsgEle.style.color = textColor | ||
noResultsMsgEle.innerHTML = ` | ||
<div> | ||
<p>We couldn't find results for:</p> | ||
${filterList} | ||
</div> | ||
<div> | ||
<h3>Search Tips</h3> | ||
<ul> | ||
<li><p>Broaden your search by removing some of the filters</p></li> | ||
</ul> | ||
</div> | ||
` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,4 @@ <h1 class="title1">Our Toolkit</h1> | |
</div> | ||
|
||
{%- include current-guides.html -%} | ||
|