add 3 kinds of buttons to open toc content

This commit is contained in:
Mivinci 2021-12-02 13:52:55 +08:00
parent d30991a039
commit 5f6611839f
11 changed files with 130 additions and 17 deletions

View file

@ -1,4 +1,4 @@
<header class="flex justify-between items-center sm:my-3">
<header class="flex justify-between items-center mb-6 sm:my-3">
<div class="flex items-center">
{{ if .Site.Params.brand }}
<div class="mr-3 text-3xl"><a href="/">{{ .Site.Params.brand }}</a></div>

View file

@ -1,6 +1,26 @@
<details class="toc mt-8">
<summary>Table of Contents</summary>
<div>
{{ if eq .Site.Params.toc "default" }}
<details class="toc toc-default">
<summary></summary>
<div class="pb-1">
{{ .TableOfContents }}
</div>
</details>
</details>
{{ end }}
{{ if eq .Site.Params.toc "bar" }}
<details class="toc toc-bar">
<summary></summary>
<div class="pb-1">
{{ .TableOfContents }}
</div>
</details>
{{ end }}
{{ if eq .Site.Params.toc "lines" }}
<details class="toc toc-lines">
<summary></summary>
<div class="pb-1">
{{ .TableOfContents }}
</div>
</details>
{{ end }}