-
Notifications
You must be signed in to change notification settings - Fork 416
/
layout.html
122 lines (105 loc) · 4.11 KB
/
layout.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
{%- extends "!layout.html" %}
{#
This template exists as a way to implement a language menu just as what
"Read The Docs" does.
#}
{%- block extrahead %}
{{ super() }}
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-4TMYCGJ0X2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-4TMYCGJ0X2');
</script>
{% endblock %}
{% block navigation %}
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
{% block menu %}
{#
The singlehtml builder doesn't handle this toctree call when the
toctree is empty. Skip building this for now.
#}
{% if 'singlehtml' not in builder %}
{% if 'zh' in pagename %}
{% set global_toc = toctree_for('zh/index',
maxdepth=theme_navigation_depth|int,
collapse=theme_collapse_navigation|tobool,
includehidden=False,
titles_only=theme_titles_only|tobool) %}
{% else %}
{% set global_toc = toctree(maxdepth=theme_navigation_depth|int,
collapse=theme_collapse_navigation|tobool,
includehidden=False,
titles_only=theme_titles_only|tobool) %}
{% endif %}
{% endif %}
{% if global_toc %}
{{ global_toc }}
{% else %}
<!-- Local TOC -->
<div class="local-toc">{{ toc }}</div>
{% endif %}
{% endblock %}
</div>
{% endblock %}
{% block footer %}
{{ footer }}
<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions">
<span class="rst-current-version" data-toggle="rst-current-version">
<span class="fa fa-book"> Read the Docs</span>
v: {{ version }}
<span class="fa fa-caret-down"></span>
</span>
<div class="rst-other-versions">
<dl>
<dt>{{ _('Versions') }}</dt>
{% for ver in versions %}
{% if ver == "stable" %}
{% if version == "stable" %}
{% if 'zh' in pagename %}
<dd><a href="{{ pathto('zh/index.html', 1) }}">{{ ver }}</a></dd>
{% else %}
<dd><a href="{{ pathto('index.html', 1) }}">{{ ver }}</a></dd>
{% endif %}
{% else %}
{% if 'zh' in pagename %}
<dd><a href="../../{{ concat_path(pathto('zh/index.html', 1), 'zh') }}/index.html">{{ ver }}</a></dd>
{% else %}
<dd><a href="../{{ pathto('index.html', 1) }}">{{ ver }}</a></dd>
{% endif %}
{% endif %}
{% else %}
{% if version == "stable" %}
{% if 'zh' in pagename %}
<dd><a href="../{{ concat_path(pathto('zh/index.html', 1), ver) }}/zh/index.html">{{ ver }}</a></dd>
{% else %}
<dd><a href="{{ concat_path(pathto('index.html', 1), ver) }}/index.html">{{ ver }}</a></dd>
{% endif %}
{% else %}
{% if 'zh' in pagename %}
<dd><a href="../../{{ concat_path(pathto('zh/index.html', 1), ver) }}/zh/index.html">{{ ver }}</a></dd>
{% else %}
<dd><a href="../{{ concat_path(pathto('index.html', 1), ver) }}/index.html">{{ ver }}</a></dd>
{% endif %}
{% endif %}
{% endif %}
{% endfor %}
</dl>
</div>
</div>
<div class="rst-languages shift-up" role="note" aria-label="languages">
<div class="rst-other-languages">
<dl>
<dt>{{ _('Languages') }}</dt>
<dd><a href="{{ pathto('index.html', 1) }}">en</a></dd>
<dd><a href="{{ pathto('zh/index.html', 1) }}">zh_CN</a></dd>
</dl>
<hr />
<small>
<span>Hosted by <a href="https://pages.github.com/">Github Pages</a>.</span>
</small>
</div>
</div>
{% endblock %}