Merge pull request #91 from meleu/patch-2

This commit is contained in:
Jacky Zhao 2022-04-04 13:08:42 -07:00 committed by GitHub
commit 3781b67707
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 4 deletions

View File

@ -23,6 +23,23 @@ p, ul, text {
padding: revert;
}
.mainTOC {
background: var(--lightgray);
border-radius: 5px;
padding: 0.75em 1em;
}
.mainTOC details summary {
cursor: zoom-in;
font-family: Inter;
color: var(--dark);
font-weight: 700;
}
.mainTOC details[open] summary {
cursor: zoom-out;
}
#TableOfContents > ol {
counter-reset: section;
margin-left: 0em;

View File

@ -1,5 +1,6 @@
name: Jacky Zhao
enableToc: true
openToc: false
enableLinkPreview: true
enableLatex: true
description:

View File

@ -24,8 +24,10 @@
</ul>
{{ if (and $.Site.Data.config.enableToc (ne .Params.enableToc false)) }}
<aside class="mainTOC">
<h3>Table of Contents</h3>
<details {{ if $.Site.Data.config.openToc }}open {{ end }}>
<summary>Table of Contents</summary>
{{ .TableOfContents }}
</details>
</aside>
{{end}}
{{partial "textprocessing.html" . }}

View File

@ -15,8 +15,10 @@
<article>
{{ if (and $.Site.Data.config.enableToc (ne .Params.enableToc false)) }}
<aside class="mainTOC">
<h3>Table of Contents</h3>
<details {{ if $.Site.Data.config.openToc }}open {{ end }}>
<summary>Table of Contents</summary>
{{ .TableOfContents }}
</details>
</aside>
{{end}}
{{partial "textprocessing.html" . }}