Change logic on rendering or not ToC
This commit is contained in:
+1
-1
@@ -399,7 +399,7 @@ body[dir="rtl"] .book-menu {
|
|||||||
|
|
||||||
.book-menu-overlay {
|
.book-menu-overlay {
|
||||||
display: block;
|
display: block;
|
||||||
position: absolute;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{{ return default
|
{{- return or
|
||||||
|
(and (eq .Type "posts") (eq .Kind "section"))
|
||||||
(not (eq .TableOfContents "<nav id=\"TableOfContents\"></nav>"))
|
(not (eq .TableOfContents "<nav id=\"TableOfContents\"></nav>"))
|
||||||
(default .Site.Params.BookToC .Params.BookToC)
|
(default .Site.Params.BookToC .Params.BookToC)
|
||||||
}}
|
-}}
|
||||||
+1
-1
@@ -52,7 +52,7 @@
|
|||||||
{{ define "header" }}
|
{{ define "header" }}
|
||||||
{{ partial "docs/header" . }}
|
{{ partial "docs/header" . }}
|
||||||
|
|
||||||
{{ if default true (default .Site.Params.BookToC .Params.BookToC) }}
|
{{ if partial "docs/toc-show" . }}
|
||||||
<aside class="hidden">
|
<aside class="hidden">
|
||||||
{{ template "toc" . }}
|
{{ template "toc" . }}
|
||||||
</aside>
|
</aside>
|
||||||
|
|||||||
Reference in New Issue
Block a user