Skip to content

Commit b6aa045

Browse files
committed
Update to add expand and collapse toggle for TOC, keep showing second level TOC if there is only one first level TOC
1 parent 881e92b commit b6aa045

File tree

3 files changed

+35
-5
lines changed

3 files changed

+35
-5
lines changed

public/css/extra.css

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,14 @@
154154
color: #767676;
155155
}
156156

157+
.ui-toc-dropdown .toc.expand ul {
158+
display: block;
159+
}
160+
161+
.ui-toc-dropdown .nav > li:first-child:nth-last-child(1) > ul {
162+
display: block;
163+
}
164+
157165
.ui-toc-dropdown .nav>li>a:focus,.ui-toc-dropdown .nav>li>a:hover {
158166
padding-left: 19px;
159167
color: black;
@@ -281,7 +289,7 @@
281289
overflow: auto;
282290
}
283291

284-
.back-to-top, .go-to-bottom {
292+
.expand-toggle, .back-to-top, .go-to-bottom {
285293
display: block;
286294
padding: 4px 10px;
287295
margin-top: 10px;
@@ -291,12 +299,12 @@
291299
color: #999;
292300
}
293301

294-
.back-to-top:hover, .back-to-top:focus, .go-to-bottom:hover, .go-to-bottom:focus {
302+
.expand-toggle:hover, .expand-toggle:focus, .back-to-top:hover, .back-to-top:focus, .go-to-bottom:hover, .go-to-bottom:focus {
295303
color: #563d7c;
296304
text-decoration: none;
297305
}
298306

299-
.go-to-bottom {
307+
.back-to-top, .go-to-bottom {
300308
margin-top: 0;
301309
}
302310

0 commit comments

Comments
 (0)