mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
Fix issue with toctree :titlesonly: and nav menu
This fixes #196 by filtering nav ul elements that have empty ul siblings
This commit is contained in:
parent
6277c21110
commit
5392b7bdbd
|
@ -19,6 +19,11 @@ Contents:
|
||||||
demo
|
demo
|
||||||
list
|
list
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:titlesonly:
|
||||||
|
|
||||||
|
toc
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
:caption: This is an incredibly long caption for a long menu
|
:caption: This is an incredibly long caption for a long menu
|
||||||
|
|
12
demo_docs/source/toc.rst
Normal file
12
demo_docs/source/toc.rst
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
=========
|
||||||
|
TOC Tests
|
||||||
|
=========
|
||||||
|
|
||||||
|
One
|
||||||
|
===
|
||||||
|
|
||||||
|
Two
|
||||||
|
---
|
||||||
|
|
||||||
|
Three
|
||||||
|
`````
|
|
@ -31,7 +31,7 @@ $(document).ready(function() {
|
||||||
$("table.docutils:not(.field-list)").wrap("<div class='wy-table-responsive'></div>");
|
$("table.docutils:not(.field-list)").wrap("<div class='wy-table-responsive'></div>");
|
||||||
|
|
||||||
// Add expand links to all parents of nested ul
|
// Add expand links to all parents of nested ul
|
||||||
$('.wy-menu-vertical ul').siblings('a').each(function () {
|
$('.wy-menu-vertical ul').not('.simple').siblings('a').each(function () {
|
||||||
var link = $(this);
|
var link = $(this);
|
||||||
expand = $('<span class="toctree-expand"></span>');
|
expand = $('<span class="toctree-expand"></span>');
|
||||||
expand.on('click', function (ev) {
|
expand.on('click', function (ev) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user