Skip to content

Commit

Permalink
ブログ一覧のページ切り替えの不具合を修正
Browse files Browse the repository at this point in the history
  • Loading branch information
tasuren authored Dec 15, 2023
1 parent 6bd83cf commit a13db63
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions src/pages/blog/tags/[tag]/[page].astro
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,24 @@ const lastPage = prop.currentPage == prop.lastPage

<!-- ページ切り替え -->
<div class="no-visited-color" style="display: flex; justify-content: space-around;">
<a data-astro-prefetch={firstPage ? "hover" : "false"} href={firstPage}>1</a>
<a data-astro-prefetch={prop.url.next ? "hover" : "false"} href={prop.url.prev}>-</a>
<a
data-astro-prefetch={firstPage ? "hover" : "false"}
href={firstPage}
>1</a>
<a
data-astro-prefetch={prop.url.prev ? "hover" : "false"}
href={prop.url.prev}
>-</a>

<button id="jump" data-max-page={prop.lastPage}>jump</button>

<a data-astro-prefetch={prop.url.next ? "hover" : "false"} href={prop.url.next}>+</a>
<a data-astro-prefetch={lastPage ? "hover" : "false"} href={lastPage}>{prop.lastPage}</a>
<a
data-astro-prefetch={prop.url.next ? "hover" : "false"}
href={prop.url.next}
>+</a>
<a
data-astro-prefetch={lastPage ? "hover" : "false"}
href={lastPage}
>{prop.lastPage}</a>
</div>
</Layout>

0 comments on commit a13db63

Please sign in to comment.