Debian Codegraph @

jupyter_sphinx_theme/jupyter/layout.html

raw ◀ ▶
1 Debian patch touch this file
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", "theme", "" %}
6 {% set bs_span_prefix = "col-md-" %}
7 {% else %}
•8 {% set bootstrap_version, bootstrap_additional_css, navbar_version = "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/bootstrap-' + bootstrap_version + '/js/bootstrap.min.js',
53 '_static/bootstrap-sphinx.js'
54 ] + theme_custom_js
55 %}
56
57 {%- set render_sidebar = (not embedded) and (not theme_nosidebar|tobool) and sidebars %}
58
59 {%- set bs_content_width = render_sidebar and "9" or "12"%}
60
61 {%- block doctype -%}
62 <!DOCTYPE html>
63 {%- endblock %}
64
65 {# Sidebar: Rework into our Bootstrap nav section. #}
66 {% macro navBar() %}
67 {% include "navbar" + navbar_version + ".html" %}
68 {% endmacro %}
69
70 {% if theme_bootstrap_version == "3" %}
71 {%- macro bsidebar() %}
72 {%- if render_sidebar %}
73 <div class="{{ bs_span_prefix }}3">
74 <div id="sidebar" class="bs-sidenav" role="complementary">
75 {%- for sidebartemplate in sidebars %}
76 {%- include sidebartemplate %}
77 {%- endfor %}
78 </div>
79 </div>
80 {%- endif %}
81 {%- endmacro %}
82 {% else %}
83 {%- macro bsidebar() %}
84 {%- if render_sidebar %}
85 <div class="{{ bs_span_prefix }}3">
86 <div id="sidebar" class="bs-sidenav well" data-spy="affix">
87 {%- for sidebartemplate in sidebars %}
88 {%- include sidebartemplate %}
89 {%- endfor %}
90 </div>
91 </div>
92 {%- endif %}
93 {%- endmacro %}
94 {% endif %}
95
96 {%- block extrahead %}
97 <meta charset='utf-8'>
98 <meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
99 <meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
100 <meta name="apple-mobile-web-app-capable" content="yes">
101 {% endblock %}
102
103 {# Silence the sidebar's, relbar's #}
104 {% block header %}{% endblock %}
105 {% block relbar1 %}{% endblock %}
106 {% block relbar2 %}{% endblock %}
107 {% block sidebarsourcelink %}{% endblock %}
108
109 {%- block content %}
110 {{ navBar() }}
111 <div class="container">
112 <div class="row">
113 {%- block sidebar1 %}{{ bsidebar() }}{% endblock %}
114 <div class="{{ bs_span_prefix }}{{ bs_content_width }} content">
115 {% block body %}{% endblock %}
116 </div>
117 {% block sidebar2 %} {# possible location for sidebar #} {% endblock %}
118 </div>
119 </div>
120 {%- endblock %}
121
122 {%- block footer %}
123 <footer class="footer">
124 <div class="container">
125 <p class="pull-right">
126 <a href="#">Back to top</a>
127 {% if theme_source_link_position == "footer" %}
128 <br/>
129 {% include "sourcelink.html" %}
130 {% endif %}
131 </p>
132 <p>
133 {%- if show_copyright %}
134 {%- if hasdoc('copyright') %}
135 {% trans path=pathto('copyright'), copyright=copyright|e %}&copy; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}<br/>
136 {%- else %}
137 {% trans copyright=copyright|e %}&copy; Copyright {{ copyright }}.{% endtrans %}<br/>
138 {%- endif %}
139 {%- endif %}
140 {%- if last_updated %}
141 {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}<br/>
142 {%- endif %}
143 {%- if show_sphinx %}
144 {% trans sphinx_version=sphinx_version|e %}Created using <a href="http://sphinx-doc.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}<br/>
145 {%- endif %}
146 </p>
147 </div>
148 </footer>
149 {%- endblock %}