Skip to content

Commit

Permalink
add classes page-odd and page-even to pages so we can style odd/even …
Browse files Browse the repository at this point in the history
…pages differently
  • Loading branch information
yihui committed Aug 28, 2024
1 parent f747588 commit 18e78c7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions js/pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@
const N = calcPages(box);
if (N > 1) box.classList.add('page-multiple');
i += N;
box.classList.add(`page-${i % 2 === 0 ? 'even' : 'odd'}`);
const info = {
'pageNumber': i, 'mainTitle': main, 'pageTitle': page_title
};
Expand Down

0 comments on commit 18e78c7

Please sign in to comment.