1 {% extends
"basic/layout.html" %}
2 {% set script_files = script_files + ['_static/bootstrap-dropdown.js', '_static/bootstrap-scrollspy.js'] %}
3 {% set css_files = ['_static/bootstrap.css', '_static/bootstrap-sphinx.css'] + css_files %}
5 {# Sidebar: Rework into our Boostrap nav section. #}
7 <div class=
"topbar" data-scrollspy=
"scrollspy" >
8 <div class=
"topbar-inner">
9 <div class=
"container">
10 <a class=
"brand" href=
"{{ pathto(master_doc) }}">{{ shorttitle|e }}
</a>
12 {% block sidebartoc %}
13 {% include
"globaltoc.html" %}
14 {% include
"localtoc.html" %}
16 {% block sidebarrel %}
17 {% include
"relations.html" %}
19 {% block sidebarsourcelink %}
20 {% include
"sourcelink.html" %}
23 <ul class=
"nav secondary-nav">
24 {% block sidebarsearch %}
25 {% include
"searchbox.html" %}
33 {%- block extrahead %}
34 <script type=
"text/javascript">
39 * Will mutate the underlying span to have a correct ul for nav.
41 * @param $span: Span containing nested UL's to mutate.
42 * @param minLevel: Starting level for nested lists. (1: global, 2: local).
44 var patchToc = function ($span
, minLevel
) {
45 var $tocList
= $("<ul/>").attr('class', "dropdown-menu"),
48 // Find all a "internal" tags, traversing recursively.
49 findA = function ($elem
, level
) {
50 var level
= level
|| 0,
51 $items
= $elem
.find("> li > a.internal, > ul, > li > ul");
53 // Iterate everything in order.
54 $items
.each(function (index
, item
) {
56 tag
= item
.tagName
.toLowerCase(),
57 pad
= 10 + ((level
- minLevel
) * 10);
59 if (tag
=== 'a' && level
>= minLevel
) {
60 // Add to existing padding.
61 $item
.css('padding-left', pad
+ "px");
63 $tocList
.append($("<li/>").append($item
));
64 } else if (tag
=== 'ul') {
66 findA($item
, level
+ 1);
71 // Start construction and return.
74 // Wipe out old list and patch in new one.
75 return $span
.empty("ul").append($tocList
);
78 $(document
).ready(function () {
79 // Patch the global and local TOC's to be bootstrap-compliant.
80 patchToc($("span.globaltoc"), 1);
81 patchToc($("span.localtoc"), 2);
84 $('#topbar').dropdown();
90 {% block header %}{{ navBar() }}{% endblock %}
92 {# Silence the sidebar's, relbar's #}
93 {% block sidebar1 %}{% endblock %}
94 {% block sidebar2 %}{% endblock %}
95 {% block relbar1 %}{% endblock %}
96 {% block relbar2 %}{% endblock %}
99 <div class=
"container">
100 {% block body %} {% endblock %}
105 <footer class=
"footer">
106 <div class=
"container">
107 <p class=
"pull-right"><a href=
"#">Back to top
</a></p>
109 {%- if show_copyright %}
110 {%- if hasdoc('copyright') %}
111 {% trans path=pathto('copyright'), copyright=copyright|e %}
© <a href=
"{{ path }}">Copyright
</a> {{ copyright }}.{% endtrans %}
<br/>
113 {% trans copyright=copyright|e %}
© Copyright {{ copyright }}.{% endtrans %}
<br/>
116 {%- if last_updated %}
117 {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
<br/>
119 {%- if show_sphinx %}
120 {% trans sphinx_version=sphinx_version|e %}Created using
<a href=
"http://sphinx.pocoo.org/">Sphinx
</a> {{ sphinx_version }}.{% endtrans %}
<br/>