mirror of
https://github.com/Wonderfall/hugo-WonderMod.git
synced 2024-11-21 18:11:37 +01:00
toc: look cool
- improve toc styling - make collapsable
This commit is contained in:
parent
984d1a576c
commit
16b98dc8f9
@ -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;
|
||||
}
|
@ -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 }}
|
||||
|
Loading…
Reference in New Issue
Block a user