Skip to content

Commit

Permalink
Color paginator red
Browse files Browse the repository at this point in the history
  • Loading branch information
achen318 committed Oct 10, 2023
1 parent 71c67d8 commit 8d11754
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions src/components/news/Paginator.astro
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,22 @@ if (currPost < 5) {
nav a {
margin-right: 0 !important;
}

.page-link {
color: red !important;
}

.active {
background-color: red !important;
border-color: red !important;
color: white !important;
}
</style>

<nav aria-label="...">
<ul class="pagination justify-content-center">
<li class={currPost - 1 != 0 ? "page-item" : "page-item disabled"}>
<a class="page-link" href={"/news/" + String(currPost - 1)}>&laquo;</a>
<li class={currPost - 1 != 0 ? 'page-item' : 'page-item disabled'}>
<a class="page-link" href={'/news/' + String(currPost - 1)}>&laquo;</a>
</li>
{
currPost > 4 && (
Expand All @@ -43,8 +53,8 @@ if (currPost < 5) {
shownPages.map((num: number) => (
<li class="page-item">
<a
class={num != currPost ? "page-link" : "page-link active"}
href={"/news/" + String(num)}
class={num != currPost ? 'page-link' : 'page-link active'}
href={'/news/' + String(num)}
>
{num}
</a>
Expand All @@ -60,10 +70,10 @@ if (currPost < 5) {
}
<li
class={currPost < numPages[numPages.length - 1]
? "page-item"
: "page-item disabled"}
? 'page-item'
: 'page-item disabled'}
>
<a class="page-link" href={"/news/" + String(currPost + 1)}>&raquo;</a>
<a class="page-link" href={'/news/' + String(currPost + 1)}>&raquo;</a>
</li>
</ul>
</nav>

0 comments on commit 8d11754

Please sign in to comment.