From e452a7bedabdfe0c0d62aa4e948902d6632a889d Mon Sep 17 00:00:00 2001 From: Alex Shpak Date: Mon, 27 May 2019 16:48:23 +0200 Subject: #52, Allow to set max showed levels of ToC. e.g. BookToC=3 --- assets/book.scss | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'assets/book.scss') diff --git a/assets/book.scss b/assets/book.scss index facc13a..66b1e81 100644 --- a/assets/book.scss +++ b/assets/book.scss @@ -147,6 +147,16 @@ ul.pagination { nav > ul > li:first-child { margin-top: 0; } + + // Classes to hide nested levels of ToC (can be replaced by @for, but it's more clear like this) + &.level-1 ul ul, + &.level-2 ul ul ul, + &.level-3 ul ul ul ul, + &.level-4 ul ul ul ul ul, + &.level-5 ul ul ul ul ul ul, + &.level-6 ul ul ul ul ul ul ul { + display: none; + } } .book-footer { -- cgit v1.2.3