diff options
author | tyler71 <4926565+tyler71@users.noreply.github.com> | 2020-01-13 08:44:24 -0800 |
---|---|---|
committer | Alex Shpak <alex-shpak@users.noreply.github.com> | 2020-01-13 17:44:24 +0100 |
commit | e037b7c70f3800a2cd38715ca31cd4cdca71c96e (patch) | |
tree | 26c10b149fbb929272338ae3d4e9a2b3b6b8f469 /layouts/partials/docs/toc.html | |
parent | d6290dcf509c84a38df667813ad3acdcf58c09f5 (diff) |
mobile toc menu (#121)
* Implement TOC for mobile
* Uses Page title as label
* Label entries so that tapping TOC will hide menu
* Switch to medium breakpoint
* Correct tos -> toc
* toc-menu-control -> toc-control
Diffstat (limited to 'layouts/partials/docs/toc.html')
-rw-r--r-- | layouts/partials/docs/toc.html | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/layouts/partials/docs/toc.html b/layouts/partials/docs/toc.html index 256a370..79bfc0a 100644 --- a/layouts/partials/docs/toc.html +++ b/layouts/partials/docs/toc.html @@ -1,6 +1,10 @@ {{ $tocLevels := default (default 6 .Site.Params.BookToC) .Params.BookToC }} {{ if and $tocLevels .Page.TableOfContents }} <aside class="book-toc levels-{{$tocLevels}} fixed"> - {{ .Page.TableOfContents }} + {{ with .Page.TableOfContents }} + <label id="toc-control" for="toc-control"> + {{ . }} + </label> + {{ end }} </aside> {{ end }} |