|
1 | 1 | {% extends "classic/layout.html" %}
|
2 | 2 |
|
3 |
| -{% block rootrellink %} |
4 |
| -<li><imgsrc="{{ pathto('_static/' + theme_root_icon, 1) }}"alt="" |
5 |
| -style="vertical-align: middle; margin-top: -1px"/></li> |
6 |
| -<li><ahref="{{theme_root_url}}">{{theme_root_name}}</a>{{ reldelim1 }}</li> |
7 |
| - {% if theme_root_include_title %} |
8 |
| -<ahref="{{ pathto('index') }}">{{ shorttitle }}</a>{{ reldelim1 }} |
9 |
| - {% endif %} |
10 |
| -{% endblock %} |
| 3 | +{%- macro relbar() %} |
| 4 | +{# modified from sphinx/themes/basic/layout.html #} |
| 5 | +<divclass="related"role="navigation"aria-label="related navigation"> |
| 6 | +<h3>{{ _('Navigation') }}</h3> |
| 7 | +<ul> |
| 8 | + {%- for rellink in rellinks %} |
| 9 | +<liclass="right"{%ifloop.first%}style="margin-right: 10px"{%endif%}> |
| 10 | +<ahref="{{ pathto(rellink[0])|e }}"title="{{ rellink[1]|striptags|e }}" |
| 11 | +{{accesskey(rellink[2])}}>{{ rellink[3] }} |
| 12 | +</a> |
| 13 | + {%- if not loop.first %}{{ reldelim2 }}{% endif %} |
| 14 | +</li> |
| 15 | + {%- endfor %} |
| 16 | + {%- block rootrellink %} |
| 17 | +<li><imgsrc="{{ pathto('_static/py.svg', 1) }}"alt="python logo"style="vertical-align: middle; margin-top: -1px"/></li> |
| 18 | +<li><ahref="{{theme_root_url}}">{{theme_root_name}}</a>{{ reldelim1 }}</li> |
| 19 | +<liclass="switchers"> |
| 20 | +<divclass="language_switcher_placeholder"></div> |
| 21 | +<divclass="version_switcher_placeholder"></div> |
| 22 | +</li> |
| 23 | +<li> |
| 24 | + {% if theme_root_include_title %} |
| 25 | +<ahref="{{ pathto('index') }}">{{ shorttitle }}</a>{{ reldelim1 }} |
| 26 | + {% endif %} |
| 27 | +</li> |
| 28 | + {%- endblock %} |
| 29 | + {%- for parent in parents %} |
| 30 | +<liclass="nav-item nav-item-{{ loop.index }}"><ahref="{{ parent.link|e }}"{%ifloop.last%}{{accesskey("U") }}{% endif %}>{{ parent.title }}</a>{{ reldelim1 }}</li> |
| 31 | + {%- endfor %} |
| 32 | +<liclass="nav-item nav-item-this"><ahref="{{ link|e }}">{{ title }}</a></li> |
| 33 | + {% block relbaritems %} |
| 34 | + {%- if pagename != "search" and builder != "singlehtml" and builder != "htmlhelp" %} |
| 35 | +<liclass="right"> |
| 36 | + {{ searchbox() }} |
| 37 | + {{ reldelim2 }} |
| 38 | +</li> |
| 39 | + {%- endif %} |
| 40 | + {% endblock %} |
| 41 | +</ul> |
| 42 | +</div> |
| 43 | +{%- endmacro %} |
11 | 44 |
|
12 | 45 | {%- macro searchbox() %}
|
13 | 46 | {# modified from sphinx/themes/basic/searchbox.html #}
|
14 | 47 | {%- if builder != "htmlhelp" %}
|
15 |
| -<divclass="inline-search"style="display: none"role="search"> |
| 48 | +<divclass="inline-search"role="search"> |
16 | 49 | <formclass="inline-search"action="{{ pathto('search') }}"method="get">
|
17 |
| -<inputplaceholder="{{ _('Quick search') }}"type="text"name="q"/> |
| 50 | +<inputplaceholder="{{ _('Quick search') }}"aria-label="{{ _('Quick search') }}"type="text"name="q"/> |
18 | 51 | <inputtype="submit"value="{{ _('Go') }}"/>
|
19 | 52 | <inputtype="hidden"name="check_keywords"value="yes"/>
|
20 | 53 | <inputtype="hidden"name="area"value="default"/>
|
21 | 54 | </form>
|
22 | 55 | </div>
|
23 |
| -<scripttype="text/javascript">$('.inline-search').show(0);</script> |
24 | 56 | {%- endif %}
|
25 | 57 | {%- endmacro %}
|
26 | 58 |
|
27 | 59 | {% block relbar1 %} {% if builder != 'qthelp' %} {{ relbar() }} {% endif %} {% endblock %}
|
28 | 60 | {% block relbar2 %} {% if builder != 'qthelp' %} {{ relbar() }} {% endif %} {% endblock %}
|
29 |
| -{% block relbaritems %} |
30 |
| - {%- if pagename != "search" and builder != "singlehtml" and builder != "htmlhelp" %} |
31 |
| -<liclass="right"> |
32 |
| - {{ searchbox() }} |
33 |
| - {{ reldelim2 }} |
34 |
| -</li> |
35 |
| - {%- endif %} |
36 |
| -{% endblock %} |
37 | 61 |
|
38 |
| -{% block extrahead %} |
| 62 | + |
| 63 | +{%- block extrahead -%} |
39 | 64 | <linkrel="shortcut icon"type="image/png"href="{{ pathto('_static/' + theme_root_icon, 1) }}"/>
|
40 |
| - {% if builder != "htmlhelp" %} |
41 |
| - {% if not embedded %}<scripttype="text/javascript"src="{{ pathto('_static/copybutton.js', 1) }}"></script>{% endif %} |
42 |
| - {% endif %} |
| 65 | + {%- if builder != "htmlhelp" %} |
| 66 | + {%- if not embedded %} |
| 67 | +<scripttype="text/javascript"src="{{ pathto('_static/copybutton.js', 1) }}"></script> |
| 68 | +<scripttype="text/javascript"src="{{ pathto('_static/menu.js', 1) }}"></script> |
| 69 | + {%- endif -%} |
| 70 | + {%- endif -%} |
| 71 | + {{ super() }} |
| 72 | +{%- endblock -%} |
| 73 | + |
| 74 | +{%- block css -%} |
| 75 | +<metaname="viewport"content="width=device-width, initial-scale=1.0"> |
43 | 76 | {{ super() }}
|
| 77 | +{%- endblock -%} |
| 78 | + |
| 79 | +{%- block body_tag %} |
| 80 | +{{ super() }} |
| 81 | +<divclass="mobile-nav"> |
| 82 | +<inputtype="checkbox"id="menuToggler"class="toggler__input"aria-controls="navigation" |
| 83 | +aria-pressed="false"aria-expanded="false"role="button"aria-label="{{ _('Menu')}}"/> |
| 84 | +<labelfor="menuToggler"class="toggler__label"> |
| 85 | +<span></span> |
| 86 | +</label> |
| 87 | +<navclass="nav-content"role="navigation"> |
| 88 | +<ahref="{{ theme_root_url }}"class="nav-logo"> |
| 89 | +<imgsrc="{{ pathto('_static/py.svg', 1) }}"alt="Logo"/> |
| 90 | +</a> |
| 91 | +<divclass="version_switcher_placeholder"></div> |
| 92 | + {%- if pagename != "search" and builder != "singlehtml" %} |
| 93 | +<formid="searchbox"role="search"class="search"action="{{ pathto('search') }}"method="get"> |
| 94 | +<svgxmlns="http://www.w3.org/2000/svg"width="20"height="20"viewBox="0 0 24 24"class="search-icon"> |
| 95 | +<pathfill-rule="nonzero" |
| 96 | +d="M15.5 14h-.79l-.28-.27a6.5 6.5 0 001.48-5.34c-.47-2.78-2.79-5-5.59-5.34a6.505 6.505 0 00-7.27 7.27c.34 2.8 2.56 5.12 5.34 5.59a6.5 6.5 0 005.34-1.48l.27.28v.79l4.25 4.25c.41.41 1.08.41 1.49 0 .41-.41.41-1.08 0-1.49L15.5 14zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"fill="#444"></path> |
| 97 | +</svg> |
| 98 | +<inputtype="text"name="q"aria-label="{{ _('Quick search') }}"/> |
| 99 | +<inputtype="submit"value="{{ _('Go') }}"/> |
| 100 | +</form> |
| 101 | + {%- endif %} |
| 102 | +</nav> |
| 103 | +<divclass="menu-wrapper"> |
| 104 | +<navclass="menu"role="navigation"aria-label="main navigation"> |
| 105 | +<divclass="language_switcher_placeholder"></div> |
| 106 | + {%- if logo %} |
| 107 | +<pclass="logo"> |
| 108 | +<ahref="{{ pathto('index') }}"> |
| 109 | +<imgclass="logo"src="{{ pathto('_static/' + logo, 1)|e }}"alt="Logo"/> |
| 110 | +</a> |
| 111 | +</p> |
| 112 | + {%- endif %} |
| 113 | + {%- for sidebartemplate in sidebars %} |
| 114 | + {%- include sidebartemplate %} |
| 115 | + {%- endfor %} |
| 116 | +</nav> |
| 117 | +</div> |
| 118 | +</div> |
44 | 119 | {% endblock %}
|
45 | 120 |
|
46 | 121 | {% block footer %}
|
|