From a287d11246cc0c18a9bf4435bddffc9e163e64fd Mon Sep 17 00:00:00 2001
From: meleu <meleu.dev@gmail.com>
Date: Mon, 04 Apr 2022 01:12:55 +0000
Subject: [PATCH] add a collapsible ToC

---
 layouts/index.html |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/layouts/index.html b/layouts/index.html
index 17b6917..466a05a 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -13,15 +13,18 @@
         {{partial "darkmode.html" .}}
     </header>
     <article>
-        {{ if (and $.Site.Data.config.enableToc (not (.Params.disableToc))) }}
+        {{ if (and $.Site.Data.config.enableToc (ne .Params.enableToc false)) }}
         <aside class="mainTOC">
-            <h3>Table of Contents</h3>
-            {{ .TableOfContents }}
+            <details {{ if $.Site.Data.config.openToc }}open {{ end }}>
+                <summary>Table of Contents</summary>
+                {{ .TableOfContents }}
+            </details>
         </aside>
         {{end}}
-        {{- .Content -}}
+        {{partial "textprocessing.html" . }}
     </article>
     {{partial "footer.html" .}}
+    {{partial "popover.html" .}}
 </div>
 </body>
 </html>

--
Gitblit v1.10.0