{% set theme_css_files = [] %} {% if theme_bootstrap_version == "3" %} {% set bootstrap_version, bootstrap_additional_css, navbar_version = "3.3.6", "theme", "" %} {% set bs_span_prefix = "col-md-" %} {% else %} {% set bootstrap_version, bootstrap_additional_css, navbar_version = "2.3.2", "responsive", "-2" %} {% set bs_span_prefix = "span" %} {% endif %} {% if theme_bootswatch_theme and theme_bootswatch_theme != "\"\"" %} {# BS2 needs "bootstrap-responsive.css". BS3 doesn't. #} {% if theme_bootstrap_version == "3" %} {% set theme_css_files = theme_css_files + [ '_static/bootswatch-' + bootstrap_version + '/' + theme_bootswatch_theme + '/bootstrap.min.css', '_static/bootstrap-sphinx.css' ] %} {% else %} {% set theme_css_files = theme_css_files + [ '_static/bootswatch-' + bootstrap_version + '/' + theme_bootswatch_theme + '/bootstrap.min.css', '_static/bootstrap-' + bootstrap_version + '/css/bootstrap-' + bootstrap_additional_css + '.min.css', '_static/bootstrap-sphinx.css' ] %} {% endif %} {% else %} {% set theme_css_files = theme_css_files + [ '_static/bootstrap-' + bootstrap_version + '/css/bootstrap.min.css', '_static/bootstrap-' + bootstrap_version + '/css/bootstrap-' + bootstrap_additional_css + '.min.css', '_static/bootstrap-sphinx.css' ] %} {% endif %} {% set bootswatch_css_custom = ['_static/extra.css'] %} {% set css_files = css_files + theme_css_files + bootswatch_css_custom %} {% set script_files = script_files + [ '_static/js/jquery-1.11.0.min.js', '_static/js/jquery-fix.js', '_static/bootstrap-' + bootstrap_version + '/js/bootstrap.js', '_static/bootstrap-sphinx.js' ] %} {%- set render_sidebar = (not embedded) and (not theme_nosidebar|tobool) and sidebars %} {%- set bs_content_width = render_sidebar and "9" or "12"%} {%- block doctype -%} {%- endblock %} {%- set reldelim1 = reldelim1 is not defined and ' »' or reldelim1 %} {%- set reldelim2 = reldelim2 is not defined and ' |' or reldelim2 %} {%- set render_sidebar = (not embedded) and (not theme_nosidebar|tobool) and (sidebars != []) %} {%- set url_root = pathto('', 1) %} {# XXX necessary? #} {%- if url_root == '#' %}{% set url_root = '' %}{% endif %} {%- if not embedded and docstitle %} {%- set titlesuffix = " — "|safe + docstitle|e %} {%- else %} {%- set titlesuffix = "" %} {%- endif %} {# Sidebar: Rework into our Bootstrap nav section. #} {% macro navBar() %} {% include "navbar" + navbar_version + ".html" %} {% endmacro %} {% if theme_bootstrap_version == "3" %} {%- macro bsidebar() %} {%- if render_sidebar %}
{%- endif %} {%- endmacro %} {% else %} {%- macro bsidebar() %} {%- if render_sidebar %}
{%- endif %} {%- endmacro %} {% endif %} {%- macro script() %} {%- for scriptfile in script_files %} {%- endfor %} {%- endmacro %} {%- macro css() %} {%- for cssfile in css_files %} {%- endfor %} {%- endmacro %} {{ metatags }} {%- block htmltitle %} {{ title|striptags|e }}{{ titlesuffix }} {%- endblock %} {{ css() }} {%- if not embedded %} {{ script() }} {%- if use_opensearch %} {%- endif %} {%- if favicon %} {%- endif %} {%- endif %} {%- block linktags %} {%- if hasdoc('about') %} {%- endif %} {%- if hasdoc('genindex') %} {%- endif %} {%- if hasdoc('search') %} {%- endif %} {%- if hasdoc('copyright') %} {%- endif %} {%- if parents %} {%- endif %} {%- if next %} {%- endif %} {%- if prev %} {%- endif %} {%- endblock %} {%- block extrahead %} {% endblock %} {%- block header %}{% endblock %} {%- block content %} {{ navBar() }}
{%- block sidebar1 %} {{ bsidebar() }} {% endblock %}
{% block body %}{% endblock %}
{%- block sidebar2 %} {% endblock %}
{%- endblock %} {%- block footer %} {%- endblock %}