-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GW-106 Add results info and refactor filters
- Loading branch information
1 parent
5fccbfb
commit f8f03fa
Showing
6 changed files
with
145 additions
and
64 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,48 @@ | ||
//// | ||
/// @group components | ||
//// | ||
|
||
/// Results info shows at the top of a list of results and | ||
/// contains the count and sort options. | ||
.results-info { | ||
@include clearfix; | ||
margin: rem(0 0 $spacing-medium); | ||
|
||
&__count { | ||
@include font-size(h5); | ||
font-weight: bold; | ||
margin: rem(0 0 $spacing-small); | ||
} | ||
|
||
&__sort { | ||
margin: 0; | ||
} | ||
|
||
&__filters { | ||
clear: both; | ||
list-style: none; | ||
margin: 0; | ||
padding-top: rem($spacing-small); | ||
} | ||
|
||
@include mq($from: sm) { | ||
margin: rem(0 0 $spacing-medium); | ||
|
||
&__count { | ||
float: left; | ||
margin: 0; | ||
width: 50%; | ||
} | ||
|
||
&__sort { | ||
float: right; | ||
text-align: right; | ||
width: 50%; | ||
} | ||
|
||
&__filter { | ||
display: inline-block; | ||
margin-right: rem($spacing-x-small); | ||
} | ||
} | ||
} |
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 @@ | ||
{% macro resultsInfo(resultsInfo) %} | ||
<div class="results-info"> | ||
<h2 class="results-info__count" aria-live="assertive" id="results-info-count">Showing {{resultsInfo.count}} results</h2> | ||
<p class="results-info__sort"> | ||
<span aria-hidden="true">Sort by: <span> | ||
<a href="#"><span class="visually-hidden">Sort by </span>Date</a> | ||
<span aria-label="or"> | </span> | ||
<span>Title (active)</span> | ||
</p> | ||
<ul class="results-info__filters"> | ||
<li class="results-info__filter"> | ||
<span class="tag tag--outline"> | ||
Type: Pathways | ||
<a href="#"><span class="icon icon--remove" aria-hidden="true"></span><span class="visually-hidden">Remove Type: Pathways filter</span></a> | ||
</span> | ||
</li> | ||
<li class="results-info__filter"> | ||
<span class="tag tag--outline"> | ||
Guidance programme: NICE guidelines | ||
<a href="#"><span class="icon icon--remove" aria-hidden="true"></span><span class="visually-hidden">Remove Guidance programme: NICE guidelines filter</span></a> | ||
</span> | ||
</li> | ||
</ul> | ||
</div> | ||
{% endmacro %} |