Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit 7cf7ce4

Browse files
author
Brad Miller
committed
Provide a chapter toc -- needs server subhcaptoc branch
1 parent 829d0b1 commit 7cf7ce4

3 files changed

Lines changed: 18 additions & 3 deletions

File tree

runestone/common/project_template/_templates/plugin_layouts/sphinx_bootstrap/globaltoc.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<a href="{{ pathto(master_doc) }}"
55
class="dropdown-toggle"
66
data-toggle="dropdown" aria-label="{{master_doc}}">{{ theme_navbar_site_name }} <b class="caret"></b></a>
7-
<ul class="dropdown-menu globaltoc"
8-
>{{ toctree(maxdepth=theme_globaltoc_depth|toint, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}</ul>
7+
<ul class="dropdown-menu globaltoc">
8+
{{ toctree(maxdepth=theme_globaltoc_depth|toint, collapse=False, includehidden=theme_globaltoc_includehidden|tobool) }}
9+
</ul>
910
</li>

runestone/common/project_template/_templates/plugin_layouts/sphinx_bootstrap/layout.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@
197197
<ul class="nav navbar-nav">
198198
<li class="divider-vertical"></li>
199199
{% block sidebartoc %}
200-
{% include "globaltoc.html" %}
200+
{% include "subchaptoc.html" %}
201201
<li class="divider-vertical"></li>
202202
{% endblock %}
203203
<!-- {% block sidebarrel %}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<script>
2+
</script>
3+
<li class="dropdown globaltoc-container">
4+
<a href="{{ pathto(master_doc) }}"
5+
class="dropdown-toggle"
6+
data-toggle="dropdown" aria-label="{{master_doc}}">This Chapter<b class="caret"></b></a>
7+
<ul class="dropdown-menu globaltoc">
8+
{% raw %}
9+
{{ for row in subchapter_list: }}
10+
<li class=toctree-l1><a class="reference internal" href="{{= row['subchap_uri']}}">{{= row['title']}}</a></li>
11+
{{ pass }}
12+
{% endraw %}
13+
</ul>
14+
</li>

0 commit comments

Comments
 (0)