add: expandable ToC

This commit is contained in:
Junyi Hou 2024-03-04 19:15:27 +08:00
parent e319a2414e
commit 528a25fed5
4 changed files with 47 additions and 9 deletions

View file

@ -72,6 +72,33 @@ main {
outline:none;
}
/* Table of Contents */
.toc {
cursor: zoom-in;
display: block;
margin-top: 1em;
margin-bottom: 1em;
padding: 0.5em 1em; /* top & bottom, left & right */
border: 1px solid var(--card-border-color);
border-radius: var(--card-border-radius);
background: var(--card-color);
font-size: 14px;
font-weight: bold;
}
.toc.expanded {
cursor: zoom-out;
}
.toc .inner {
margin: 0px;
padding: 0px;
}
/* Headers */
h1 {
font-size: 1.35em;
@ -257,7 +284,7 @@ header nav:not(:empty){
text-align: center;
padding: 0.5em 0;
border: 1px solid var(--card-border-color);
border-radius: var(--nav-border-radius);
border-radius: var(--card-border-radius);
}
header nav a {