1 {% extends
"basic/layout.html" %}
2 {% set script_files = script_files + ['_static/bootstrap.js'] %}
3 {% set css_files = ['_static/bootstrap.css', '_static/bootstrap-sphinx.css'] + css_files %}
5 {# Sidebar: Rework into our Boostrap nav section. #}
7 <div id=
"navbar" class=
"navbar navbar-fixed-top">
8 <div class=
"navbar-inner">
9 <div class=
"container-fluid">
10 <a class=
"brand" href=
"{{ pathto(master_doc) }}">{{ project|e }}
</a>
11 <span class=
"navbar-text pull-left"><b>{{ version|e }}
</b></span>
13 <li class=
"divider-vertical"></li>
14 {% block sidebartoc %}
15 {% include
"globaltoc.html" %}
16 {% include
"localtoc.html" %}
18 {% block sidebarrel %}
19 {% include
"relations.html" %}
21 {% block sidebarsourcelink %}
22 {% include
"sourcelink.html" %}
25 {% block sidebarsearch %}
26 {% include
"searchbox.html" %}
35 {%- block extrahead %}
36 <script type=
"text/javascript">
41 * Will mutate the underlying span to have a correct ul for nav.
43 * @param $span: Span containing nested UL's to mutate.
44 * @param minLevel: Starting level for nested lists. (1: global, 2: local).
46 var patchToc = function ($ul
, minLevel
) {
49 // Find all a "internal" tags, traversing recursively.
50 findA = function ($elem
, level
) {
51 var level
= level
|| 0,
52 $items
= $elem
.find("> li > a.internal, > ul, > li > ul");
54 // Iterate everything in order.
55 $items
.each(function (index
, item
) {
57 tag
= item
.tagName
.toLowerCase(),
58 pad
= 15 + ((level
- minLevel
) * 10);
60 if (tag
=== 'a' && level
>= minLevel
) {
61 // Add to existing padding.
62 $item
.css('padding-left', pad
+ "px");
63 console
.log(level
, $item
, 'padding-left', pad
+ "px");
64 } else if (tag
=== 'ul') {
66 findA($item
, level
+ 1);
75 $(document
).ready(function () {
76 // Add styling, structure to TOC's.
77 $(".dropdown-menu").each(function () {
78 $(this).find("ul").each(function (index
, item
){
80 $item
.addClass('unstyled');
82 $(this).find("li").each(function () {
83 $(this).parent().append(this);
88 patchToc($("ul.globaltoc"), 2);
89 patchToc($("ul.localtoc"), 2);
92 $('.dropdown-toggle').dropdown();
98 {% block header %}{{ navBar() }}{% endblock %}
100 {# Silence the sidebar's, relbar's #}
101 {% block sidebar1 %}{% endblock %}
102 {% block sidebar2 %}{% endblock %}
103 {% block relbar1 %}{% endblock %}
104 {% block relbar2 %}{% endblock %}
107 <div class=
"container">
108 {% block body %} {% endblock %}
113 <footer class=
"footer">
114 <div class=
"container">
115 <p class=
"pull-right"><a href=
"#">Back to top
</a></p>
117 {%- if show_copyright %}
118 {%- if hasdoc('copyright') %}
119 {% trans path=pathto('copyright'), copyright=copyright|e %}
© <a href=
"{{ path }}">Copyright
</a> {{ copyright }}.{% endtrans %}
<br/>
121 {% trans copyright=copyright|e %}
© Copyright {{ copyright }}.{% endtrans %}
<br/>
124 {%- if last_updated %}
125 {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
<br/>
127 {%- if show_sphinx %}
128 {% trans sphinx_version=sphinx_version|e %}Created using
<a href=
"http://sphinx.pocoo.org/">Sphinx
</a> {{ sphinx_version }}.{% endtrans %}
<br/>