forked from mozilla/kitsune
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pagination component added, ref mozilla/sumo#130
- Loading branch information
1 parent
1c24588
commit 8c5f5c2
Showing
6 changed files
with
118 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
@use '../config' as c; | ||
@use '../protocol' as p; | ||
|
||
// Pagination | ||
// | ||
// This is the pagination component. | ||
// | ||
// Markup: ../../../../../../styleguide/styleguide-examples/pagination.njk | ||
// | ||
// Weight: 5 | ||
// | ||
// Style guide: pagination | ||
|
||
.pagination { | ||
display: flex; | ||
align-items: center; | ||
|
||
a { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
text-align: center; | ||
width: 24px; | ||
height: 24px; | ||
border-radius: var(--global-radius); | ||
color: var(--color-text); | ||
text-decoration: none; | ||
|
||
&:hover { | ||
text-decoration: none; | ||
color: var(--color-heading); | ||
background-color: var(--color-shade-bg); | ||
} | ||
} | ||
|
||
li { | ||
margin: 0 4px; | ||
|
||
&.selected a { | ||
background-color: var(--color-link); | ||
color: var(--color-inverse); | ||
} | ||
} | ||
|
||
svg { | ||
width: 16px; | ||
height: 16px; | ||
} | ||
|
||
&--wrap { | ||
display: flex; | ||
justify-content: space-between; | ||
flex-wrap: wrap; | ||
padding: 12px 0; | ||
|
||
p { | ||
margin-right: 16px; | ||
white-space: nowrap; | ||
} | ||
} | ||
|
||
} |
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,29 @@ | ||
<div class="pagination--wrap"> | ||
<p>Results 1 of 305</p> | ||
<ol class="pagination"> | ||
<li><a href="#" href="#page=1"> | ||
<svg width="24px" height="24px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> | ||
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"> | ||
<polyline stroke="currentColor" stroke-width="2" points="15 5 8 12 15 19"></polyline> | ||
</g> | ||
</svg> | ||
<span class="sr-only">Previous</span> | ||
</a></li> | ||
<li><a href="#" href="#page=2">2</a></li> | ||
<li class="selected"><a href="#" href="#page=3">3</a></li> | ||
<li><a href="#" href="#page=4">4</a></li> | ||
<li><a href="#" href="#page=5">5</a></li> | ||
<li><a href="#" href="#page=6">6</a></li> | ||
<li><a href="#" href="#page=7">7</a></li> | ||
<li><a href="#" href="#page=8">8</a></li> | ||
<li class="next"><a href="#" href="#page=2"> | ||
<span class="sr-only">Next</span> | ||
<svg width="24px" height="24px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> | ||
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"> | ||
<polyline stroke="currentColor" stroke-width="2" points="9 19 16 12 9 5"></polyline> | ||
</g> | ||
</svg> | ||
</a></li> | ||
</ol> | ||
|
||
</div> |