mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-12-22 12:13:19 -06:00
Make table of contents collapsible
This commit is contained in:
parent
a1fae8aa60
commit
0cfecdab18
@ -62,8 +62,14 @@
|
|||||||
|
|
||||||
|
|
||||||
/* Content formatting */
|
/* Content formatting */
|
||||||
#table-of-contents h2 {
|
#table-of-contents {
|
||||||
font-size: 20px;
|
background-color: #222;
|
||||||
|
padding: 8px 20px;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#table-of-contents summary {
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content, footer {
|
.content, footer {
|
||||||
|
@ -10,13 +10,13 @@
|
|||||||
|
|
||||||
{{ if .Params.Toc }}
|
{{ if .Params.Toc }}
|
||||||
<div id="table-of-contents">
|
<div id="table-of-contents">
|
||||||
<h2>{{ i18n "table_of_contents" }}</h2>
|
<details>
|
||||||
|
<summary>{{ i18n "table_of_contents" }}</summary>
|
||||||
{{ .TableOfContents }}
|
{{ .TableOfContents }}
|
||||||
|
</details>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
{{ with .Resources.GetMatch "feature" }}
|
{{ with .Resources.GetMatch "feature" }}
|
||||||
<div class="post-media">
|
<div class="post-media">
|
||||||
{{ partial "figure.html" . }}
|
{{ partial "figure.html" . }}
|
||||||
|
Loading…
Reference in New Issue
Block a user