Last active
August 24, 2022 02:45
-
-
Save touhidrahman/b57dd29c61fe710a487a1a418fa9d775 to your computer and use it in GitHub Desktop.
Pagination bar template - 1
This file contains hidden or 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
<nav aria-label="Page navigation"> | |
<ul class="navlinks"> | |
<li><a class="navlink"> First </a></li> | |
<li><a class="navlink"> < Prev </a></li> | |
<li *ngFor="let page of [1, 2, 3, 4, 5]"> | |
<a class="navlink"> | |
{{ page }} | |
</a> | |
</li> | |
<li><a class="navlink"> Next > </a></li> | |
<li><a class="navlink"> Last </a></li> | |
</ul> | |
</nav> |
This file contains hidden or 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
:host { | |
display: block; | |
} | |
.navlinks { | |
display: inline-flex; | |
} | |
.navlinks li { | |
margin-right: 0; | |
margin-left: -1px; | |
&:first-child .navlink { | |
border-top-left-radius: 0.5rem; | |
border-bottom-left-radius: 0.5rem; | |
} | |
&:last-child .navlink { | |
border-top-right-radius: 0.5rem; | |
border-bottom-right-radius: 0.5rem; | |
} | |
} | |
.navlink { | |
margin-left: 0; | |
border-width: 1px; | |
border-color: rgb(209 213 219); | |
background-color: white; | |
padding: 0.5rem 0.75rem; | |
line-height: 1.25; | |
color: rgb(107 114 128); | |
&:hover { | |
background-color: rgb(243 244 246); | |
color: rgb(55 65 81); | |
} | |
&.active { | |
background-color: rgb(220, 222, 226); | |
color: rgb(55 65 81); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment