| 1 |
{% extends "basic/layout.html" %} |
| 2 |
|
| 3 |
{% set theme_css_files = [] %} |
| 4 |
{% if theme_bootstrap_version == "3" %} |
| 5 |
{% set bootstrap_version, bootstrap_additional_css, navbar_version = "3.3.4", "theme", "" %} |
| 6 |
{% set bs_span_prefix = "col-md-" %} |
| 7 |
{% else %} |
| 8 |
{% set bootstrap_version, bootstrap_additional_css, navbar_version = "2.3.2", "responsive", "-2" %} |
| 9 |
{% set bs_span_prefix = "span" %} |
| 10 |
{% endif %} |
| 11 |
|
| 12 |
{% if theme_bootswatch_theme and theme_bootswatch_theme != "\"\"" %} |
| 13 |
{# BS2 needs "bootstrap-responsive.css". BS3 doesn't. #} |
| 14 |
{% if theme_bootstrap_version == "3" %} |
| 15 |
{% set theme_css_files = theme_css_files + [ |
| 16 |
'_static/bootswatch-' + bootstrap_version + '/' + theme_bootswatch_theme + '/bootstrap.min.css', |
| 17 |
'_static/bootstrap-sphinx.css' |
| 18 |
] |
| 19 |
%} |
| 20 |
{% else %} |
| 21 |
{% set theme_css_files = theme_css_files + [ |
| 22 |
'_static/bootswatch-' + bootstrap_version + '/' + theme_bootswatch_theme + '/bootstrap.min.css', |
| 23 |
'_static/bootstrap-' + bootstrap_version + '/css/bootstrap-' + bootstrap_additional_css + '.min.css', |
| 24 |
'_static/bootstrap-sphinx.css' |
| 25 |
] |
| 26 |
%} |
| 27 |
{% endif %} |
| 28 |
{% else %} |
| 29 |
{% set theme_css_files = theme_css_files + [ |
| 30 |
'_static/bootstrap-' + bootstrap_version + '/css/bootstrap.min.css', |
| 31 |
'_static/bootstrap-' + bootstrap_version + '/css/bootstrap-' + bootstrap_additional_css + '.min.css', |
| 32 |
'_static/bootstrap-sphinx.css' |
| 33 |
] |
| 34 |
%} |
| 35 |
{% endif %} |
| 36 |
|
| 37 |
{% if not bootswatch_css_custom %} |
| 38 |
{% set bootswatch_css_custom = [] %} |
| 39 |
{% endif %} |
| 40 |
|
| 41 |
{% if not theme_custom_css %} |
| 42 |
{% set theme_custom_css = [] %} |
| 43 |
{% endif %} |
| 44 |
|
| 45 |
{% set css_files = css_files + theme_css_files + bootswatch_css_custom + theme_custom_css %} |
| 46 |
|
| 47 |
{% if not theme_custom_js %} |
| 48 |
{% set theme_custom_js = [] %} |
| 49 |
{% endif %} |
| 50 |
|
| 51 |
{% set script_files = script_files + [ |
| 52 |
'_static/js/jquery-1.11.0.min.js', |
| 53 |
'_static/js/jquery-fix.js', |
| 54 |
'_static/bootstrap-' + bootstrap_version + '/js/bootstrap.min.js', |
| 55 |
'_static/bootstrap-sphinx.js' |
| 56 |
] + theme_custom_js |
| 57 |
%} |
| 58 |
|
| 59 |
{%- set render_sidebar = (not embedded) and (not theme_nosidebar|tobool) and sidebars %} |
| 60 |
|
| 61 |
{%- set bs_content_width = render_sidebar and "9" or "12"%} |
| 62 |
|
| 63 |
{%- block doctype -%} |
| 64 |
<!DOCTYPE html> |
| 65 |
{%- endblock %} |
| 66 |
|
| 67 |
{# Sidebar: Rework into our Bootstrap nav section. #} |
| 68 |
{% macro navBar() %} |
| 69 |
{% include "navbar" + navbar_version + ".html" %} |
| 70 |
{% endmacro %} |
| 71 |
|
| 72 |
{% if theme_bootstrap_version == "3" %} |
| 73 |
{%- macro bsidebar() %} |
| 74 |
{%- if render_sidebar %} |
| 75 |
<div class="{{ bs_span_prefix }}3"> |
| 76 |
<div id="sidebar" class="bs-sidenav" role="complementary"> |
| 77 |
{%- for sidebartemplate in sidebars %} |
| 78 |
{%- include sidebartemplate %} |
| 79 |
{%- endfor %} |
| 80 |
</div> |
| 81 |
</div> |
| 82 |
{%- endif %} |
| 83 |
{%- endmacro %} |
| 84 |
{% else %} |
| 85 |
{%- macro bsidebar() %} |
| 86 |
{%- if render_sidebar %} |
| 87 |
<div class="{{ bs_span_prefix }}3"> |
| 88 |
<div id="sidebar" class="bs-sidenav well" data-spy="affix"> |
| 89 |
{%- for sidebartemplate in sidebars %} |
| 90 |
{%- include sidebartemplate %} |
| 91 |
{%- endfor %} |
| 92 |
</div> |
| 93 |
</div> |
| 94 |
{%- endif %} |
| 95 |
{%- endmacro %} |
| 96 |
{% endif %} |
| 97 |
|
| 98 |
{%- block extrahead %} |
| 99 |
<meta charset='utf-8'> |
| 100 |
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'> |
| 101 |
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'> |
| 102 |
<meta name="apple-mobile-web-app-capable" content="yes"> |
| 103 |
{% endblock %} |
| 104 |
|
| 105 |
{# Silence the sidebar's, relbar's #} |
| 106 |
{% block header %}{% endblock %} |
| 107 |
{% block relbar1 %}{% endblock %} |
| 108 |
{% block relbar2 %}{% endblock %} |
| 109 |
{% block sidebarsourcelink %}{% endblock %} |
| 110 |
|
| 111 |
{%- block content %} |
| 112 |
{{ navBar() }} |
| 113 |
<div class="container"> |
| 114 |
<div class="row"> |
| 115 |
{%- block sidebar1 %}{{ bsidebar() }}{% endblock %} |
| 116 |
<div class="{{ bs_span_prefix }}{{ bs_content_width }} content"> |
| 117 |
{% block body %}{% endblock %} |
| 118 |
</div> |
| 119 |
{% block sidebar2 %} {# possible location for sidebar #} {% endblock %} |
| 120 |
</div> |
| 121 |
</div> |
| 122 |
{%- endblock %} |
| 123 |
|
| 124 |
{%- block footer %} |
| 125 |
<footer class="footer"> |
| 126 |
<div class="container"> |
| 127 |
<p class="pull-right"> |
| 128 |
<a href="#">Back to top</a> |
| 129 |
{% if theme_source_link_position == "footer" %} |
| 130 |
<br/> |
| 131 |
{% include "sourcelink.html" %} |
| 132 |
{% endif %} |
| 133 |
</p> |
| 134 |
<p> |
| 135 |
{%- if show_copyright %} |
| 136 |
{%- if hasdoc('copyright') %} |
| 137 |
{% trans path=pathto('copyright'), copyright=copyright|e %}© <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}<br/> |
| 138 |
{%- else %} |
| 139 |
{% trans copyright=copyright|e %}© Copyright {{ copyright }}.{% endtrans %}<br/> |
| 140 |
{%- endif %} |
| 141 |
{%- endif %} |
| 142 |
{%- if last_updated %} |
| 143 |
{% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}<br/> |
| 144 |
{%- endif %} |
| 145 |
{%- if show_sphinx %} |
| 146 |
{% trans sphinx_version=sphinx_version|e %}Created using <a href="http://sphinx-doc.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}<br/> |
| 147 |
{%- endif %} |
| 148 |
</p> |
| 149 |
</div> |
| 150 |
</footer> |
| 151 |
{%- endblock %} |