Skip to content

Commit

Permalink
update table of contents to use the pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
sirkitree committed Oct 1, 2024
1 parent cc59a5d commit 4b4fe4b
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions src/_includes/table-of-contents.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: layout
title: "Table of Contents"
---

<nav class="toc-container toc-container-page" aria-labelledby="toc-title">
<p id="toc-title">{{ title }}</p>
<div class="toc-columns">
Expand Down Expand Up @@ -47,18 +47,11 @@ title: "Table of Contents"
{% endfor %}
</div>
{% include 'get-started', title: bookWithPages.book.title %}

<nav class="nav-container" aria-label="E-book arrow navigation">
<a href="../cover/" aria-label="Previous page">
<div class="nav-button">
<i class="gg-arrow-left"></i>
</div>
</a>
<a href="../pages/page-1" aria-label="Next page">
<div class="nav-button">
<i class="gg-arrow-right"></i>
</div>
</a>
</nav>

{% assign bookWithPages = collections.booksWithPages | where: "book.slug", currentBookSlug | first %}
{% assign page = bookWithPages.pages | first %}
{% assign nextPage = page.next %}

{% include 'pagination.liquid' %}
</nav>

0 comments on commit 4b4fe4b

Please sign in to comment.