diff options
| -rw-r--r-- | assets/css/main.css | 10 | ||||
| -rw-r--r-- | layouts/_default/single.html | 14 |
2 files changed, 18 insertions, 6 deletions
diff --git a/assets/css/main.css b/assets/css/main.css index b1874d7..5afb1a5 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -47,7 +47,13 @@ } .toc { - border-bottom: 1px solid var(--border); - font-size: 20px; + margin-bottom: 40px; + border: 1px solid var(--border); + border-radius: 4px; + padding: .5em; +} + +.toc .details { + display: inline; font-weight: 500; }
\ No newline at end of file diff --git a/layouts/_default/single.html b/layouts/_default/single.html index a2775fc..8ba8fc6 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -13,10 +13,16 @@ </div> </header> {{ if .Params.ShowToc }} - <blockquote> - <div class="toc">Table of Contents</div> - {{ .TableOfContents }} - </blockquote> + <div class="toc"> + <details> + <summary> + <div class="details">Table of Contents</div> + </summary> + <blockquote> + {{ .TableOfContents }} + </blockquote> + </details> + </div> {{ end }} <div class="post-content">{{ .Content }}</div> {{- if .Params.tags }} |
