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', '_static/ansible-local.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
<li><a href="/">Home</A>
14
{% include "globaltoc.html" %}
15
{% include "localtoc.html" %}
18
<ul class="nav secondary-nav">
19
{% block sidebarsearch %}
20
{% include "searchbox.html" %}
29
{%- block extrahead %}
30
<script type="text/javascript">
35
* Will mutate the underlying span to have a correct ul for nav.
37
* @param $span: Span containing nested UL's to mutate.
38
* @param minLevel: Starting level for nested lists. (1: global, 2: local).
40
var patchToc = function ($span, minLevel) {
41
var $tocList = $("<ul/>").attr('class', "dropdown-menu"),
44
// Find all a "internal" tags, traversing recursively.
45
findA = function ($elem, level) {
46
var level = level || 0,
47
$items = $elem.find("> li > a.internal, > ul, > li > ul");
49
// Iterate everything in order.
50
$items.each(function (index, item) {
52
tag = item.tagName.toLowerCase(),
53
pad = 10 + ((level - minLevel) * 10);
55
if (tag === 'a' && level >= minLevel) {
56
// Add to existing padding.
57
$item.css('padding-left', pad + "px");
59
$tocList.append($("<li/>").append($item));
60
} else if (tag === 'ul') {
62
findA($item, level + 1);
67
// Start construction and return.
70
// Wipe out old list and patch in new one.
71
return $span.empty("ul").append($tocList);
74
$(document).ready(function () {
75
// Patch the global and local TOC's to be bootstrap-compliant.
76
patchToc($("span.globaltoc"), 1);
77
patchToc($("span.localtoc"), 2);
80
$('#topbar').dropdown();
85
<script type="text/javascript">
86
// Set the maximum height of drop down menus to just less than the height
88
var set_max_menu_height = function () {
90
// set menu max height to 75 less than viewport height
91
$('.dropdown-menu').css('max-height', $(window).height() - 75);
94
// Set this when we set the page up and on each resize.
95
$(window).resize(set_max_menu_height);
96
$(window).ready(set_max_menu_height);
102
{% block header %}{{ navBar() }}{% endblock %}
104
{# Silence the sidebar's, relbar's #}
105
{% block sidebar1 %}{% endblock %}
106
{% block sidebar2 %}{% endblock %}
107
{% block relbar1 %}{% endblock %}
108
{% block relbar2 %}{% endblock %}
112
<div class="container">
113
{% block body %} {% endblock %}
120
<footer class="footer">
123
{%- if show_copyright %}
124
{%- if hasdoc('copyright') %}
125
{% trans path=pathto('copyright'), copyright=copyright|e %}© <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}<br/>
127
{% trans copyright=copyright|e %}© Copyright {{ copyright }}.{% endtrans %}<br/>
130
{%- if last_updated %}
131
{% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}<br/>