Skip to content

Commit d1f2565

Browse files
committed
Update User Guide
1 parent 20eb45d commit d1f2565

327 files changed

Lines changed: 8756 additions & 9415 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

_static/_sphinx_javascript_frameworks_compat.js

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
1-
/*
2-
* _sphinx_javascript_frameworks_compat.js
3-
* ~~~~~~~~~~
4-
*
5-
* Compatability shim for jQuery and underscores.js.
6-
*
7-
* WILL BE REMOVED IN Sphinx 6.0
8-
* xref RemovedInSphinx60Warning
1+
/* Compatability shim for jQuery and underscores.js.
92
*
3+
* Copyright Sphinx contributors
4+
* Released under the two clause BSD licence
105
*/
116

12-
/**
13-
* select a different prefix for underscore
14-
*/
15-
$u = _.noConflict();
16-
17-
187
/**
198
* small helper function to urldecode strings
209
*

_static/basic.css

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
/*
2-
* basic.css
3-
* ~~~~~~~~~
4-
*
52
* Sphinx stylesheet -- basic theme.
6-
*
7-
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
8-
* :license: BSD, see LICENSE for details.
9-
*
103
*/
114

125
/* -- main layout ----------------------------------------------------------- */
@@ -115,15 +108,11 @@ img {
115108
/* -- search page ----------------------------------------------------------- */
116109

117110
ul.search {
118-
margin: 10px 0 0 20px;
119-
padding: 0;
111+
margin-top: 10px;
120112
}
121113

122114
ul.search li {
123-
padding: 5px 0 5px 20px;
124-
background-image: url(file.png);
125-
background-repeat: no-repeat;
126-
background-position: 0 7px;
115+
padding: 5px 0;
127116
}
128117

129118
ul.search li a {
@@ -237,6 +226,10 @@ a.headerlink {
237226
visibility: hidden;
238227
}
239228

229+
a:visited {
230+
color: #551A8B;
231+
}
232+
240233
h1:hover > a.headerlink,
241234
h2:hover > a.headerlink,
242235
h3:hover > a.headerlink,
@@ -324,13 +317,15 @@ aside.sidebar {
324317
p.sidebar-title {
325318
font-weight: bold;
326319
}
320+
327321
nav.contents,
328322
aside.topic,
329323
div.admonition, div.topic, blockquote {
330324
clear: left;
331325
}
332326

333327
/* -- topics ---------------------------------------------------------------- */
328+
334329
nav.contents,
335330
aside.topic,
336331
div.topic {
@@ -606,6 +601,7 @@ ol.simple p,
606601
ul.simple p {
607602
margin-bottom: 0;
608603
}
604+
609605
aside.footnote > span,
610606
div.citation > span {
611607
float: left;
@@ -667,6 +663,16 @@ dd {
667663
margin-left: 30px;
668664
}
669665

666+
.sig dd {
667+
margin-top: 0px;
668+
margin-bottom: 0px;
669+
}
670+
671+
.sig dl {
672+
margin-top: 0px;
673+
margin-bottom: 0px;
674+
}
675+
670676
dl > dd:last-child,
671677
dl > dd:last-child > :last-child {
672678
margin-bottom: 0;

_static/css/badge_only.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

_static/css/theme.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

_static/doctools.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
/*
2-
* doctools.js
3-
* ~~~~~~~~~~~
4-
*
52
* Base JavaScript utilities for all Sphinx HTML documentation.
6-
*
7-
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
8-
* :license: BSD, see LICENSE for details.
9-
*
103
*/
114
"use strict";
125

_static/documentation_options.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
var DOCUMENTATION_OPTIONS = {
2-
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
1+
const DOCUMENTATION_OPTIONS = {
32
VERSION: '4.7.0',
43
LANGUAGE: 'en',
54
COLLAPSE_INDEX: false,

_static/js/versions.js

Lines changed: 228 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,228 @@
1+
const themeFlyoutDisplay = "hidden";
2+
const themeVersionSelector = true;
3+
const themeLanguageSelector = true;
4+
5+
if (themeFlyoutDisplay === "attached") {
6+
function renderLanguages(config) {
7+
if (!config.projects.translations.length) {
8+
return "";
9+
}
10+
11+
// Insert the current language to the options on the selector
12+
let languages = config.projects.translations.concat(config.projects.current);
13+
languages = languages.sort((a, b) => a.language.name.localeCompare(b.language.name));
14+
15+
const languagesHTML = `
16+
<dl>
17+
<dt>Languages</dt>
18+
${languages
19+
.map(
20+
(translation) => `
21+
<dd ${translation.slug == config.projects.current.slug ? 'class="rtd-current-item"' : ""}>
22+
<a href="${translation.urls.documentation}">${translation.language.code}</a>
23+
</dd>
24+
`,
25+
)
26+
.join("\n")}
27+
</dl>
28+
`;
29+
return languagesHTML;
30+
}
31+
32+
function renderVersions(config) {
33+
if (!config.versions.active.length) {
34+
return "";
35+
}
36+
const versionsHTML = `
37+
<dl>
38+
<dt>Versions</dt>
39+
${config.versions.active
40+
.map(
41+
(version) => `
42+
<dd ${version.slug === config.versions.current.slug ? 'class="rtd-current-item"' : ""}>
43+
<a href="${version.urls.documentation}">${version.slug}</a>
44+
</dd>
45+
`,
46+
)
47+
.join("\n")}
48+
</dl>
49+
`;
50+
return versionsHTML;
51+
}
52+
53+
function renderDownloads(config) {
54+
if (!Object.keys(config.versions.current.downloads).length) {
55+
return "";
56+
}
57+
const downloadsNameDisplay = {
58+
pdf: "PDF",
59+
epub: "Epub",
60+
htmlzip: "HTML",
61+
};
62+
63+
const downloadsHTML = `
64+
<dl>
65+
<dt>Downloads</dt>
66+
${Object.entries(config.versions.current.downloads)
67+
.map(
68+
([name, url]) => `
69+
<dd>
70+
<a href="${url}">${downloadsNameDisplay[name]}</a>
71+
</dd>
72+
`,
73+
)
74+
.join("\n")}
75+
</dl>
76+
`;
77+
return downloadsHTML;
78+
}
79+
80+
document.addEventListener("readthedocs-addons-data-ready", function (event) {
81+
const config = event.detail.data();
82+
83+
const flyout = `
84+
<div class="rst-versions" data-toggle="rst-versions" role="note">
85+
<span class="rst-current-version" data-toggle="rst-current-version">
86+
<span class="fa fa-book"> Read the Docs</span>
87+
v: ${config.versions.current.slug}
88+
<span class="fa fa-caret-down"></span>
89+
</span>
90+
<div class="rst-other-versions">
91+
<div class="injected">
92+
${renderLanguages(config)}
93+
${renderVersions(config)}
94+
${renderDownloads(config)}
95+
<dl>
96+
<dt>On Read the Docs</dt>
97+
<dd>
98+
<a href="${config.projects.current.urls.home}">Project Home</a>
99+
</dd>
100+
<dd>
101+
<a href="${config.projects.current.urls.builds}">Builds</a>
102+
</dd>
103+
<dd>
104+
<a href="${config.projects.current.urls.downloads}">Downloads</a>
105+
</dd>
106+
</dl>
107+
<dl>
108+
<dt>Search</dt>
109+
<dd>
110+
<form id="flyout-search-form">
111+
<input
112+
class="wy-form"
113+
type="text"
114+
name="q"
115+
aria-label="Search docs"
116+
placeholder="Search docs"
117+
/>
118+
</form>
119+
</dd>
120+
</dl>
121+
<hr />
122+
<small>
123+
<span>Hosted by <a href="https://about.readthedocs.org/?utm_source=&utm_content=flyout">Read the Docs</a></span>
124+
</small>
125+
</div>
126+
</div>
127+
`;
128+
129+
// Inject the generated flyout into the body HTML element.
130+
document.body.insertAdjacentHTML("beforeend", flyout);
131+
132+
// Trigger the Read the Docs Addons Search modal when clicking on the "Search docs" input from inside the flyout.
133+
document
134+
.querySelector("#flyout-search-form")
135+
.addEventListener("focusin", () => {
136+
const event = new CustomEvent("readthedocs-search-show");
137+
document.dispatchEvent(event);
138+
});
139+
})
140+
}
141+
142+
if (themeLanguageSelector || themeVersionSelector) {
143+
function onSelectorSwitch(event) {
144+
const option = event.target.selectedIndex;
145+
const item = event.target.options[option];
146+
window.location.href = item.dataset.url;
147+
}
148+
149+
document.addEventListener("readthedocs-addons-data-ready", function (event) {
150+
const config = event.detail.data();
151+
152+
const versionSwitch = document.querySelector(
153+
"div.switch-menus > div.version-switch",
154+
);
155+
if (themeVersionSelector) {
156+
let versions = config.versions.active;
157+
if (config.versions.current.hidden || config.versions.current.type === "external") {
158+
versions.unshift(config.versions.current);
159+
}
160+
const versionSelect = `
161+
<select>
162+
${versions
163+
.map(
164+
(version) => `
165+
<option
166+
value="${version.slug}"
167+
${config.versions.current.slug === version.slug ? 'selected="selected"' : ""}
168+
data-url="${version.urls.documentation}">
169+
${version.slug}
170+
</option>`,
171+
)
172+
.join("\n")}
173+
</select>
174+
`;
175+
176+
versionSwitch.innerHTML = versionSelect;
177+
versionSwitch.firstElementChild.addEventListener("change", onSelectorSwitch);
178+
}
179+
180+
const languageSwitch = document.querySelector(
181+
"div.switch-menus > div.language-switch",
182+
);
183+
184+
if (themeLanguageSelector) {
185+
if (config.projects.translations.length) {
186+
// Add the current language to the options on the selector
187+
let languages = config.projects.translations.concat(
188+
config.projects.current,
189+
);
190+
languages = languages.sort((a, b) =>
191+
a.language.name.localeCompare(b.language.name),
192+
);
193+
194+
const languageSelect = `
195+
<select>
196+
${languages
197+
.map(
198+
(language) => `
199+
<option
200+
value="${language.language.code}"
201+
${config.projects.current.slug === language.slug ? 'selected="selected"' : ""}
202+
data-url="${language.urls.documentation}">
203+
${language.language.name}
204+
</option>`,
205+
)
206+
.join("\n")}
207+
</select>
208+
`;
209+
210+
languageSwitch.innerHTML = languageSelect;
211+
languageSwitch.firstElementChild.addEventListener("change", onSelectorSwitch);
212+
}
213+
else {
214+
languageSwitch.remove();
215+
}
216+
}
217+
});
218+
}
219+
220+
document.addEventListener("readthedocs-addons-data-ready", function (event) {
221+
// Trigger the Read the Docs Addons Search modal when clicking on "Search docs" input from the topnav.
222+
document
223+
.querySelector("[role='search'] input")
224+
.addEventListener("focusin", () => {
225+
const event = new CustomEvent("readthedocs-search-show");
226+
document.dispatchEvent(event);
227+
});
228+
});

_static/language_data.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
11
/*
2-
* language_data.js
3-
* ~~~~~~~~~~~~~~~~
4-
*
52
* This script contains the language-specific data used by searchtools.js,
63
* namely the list of stopwords, stemmer, scorer and splitter.
7-
*
8-
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
9-
* :license: BSD, see LICENSE for details.
10-
*
114
*/
125

136
var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"];
147

158

16-
/* Non-minified version is copied as a separate JS file, is available */
9+
/* Non-minified version is copied as a separate JS file, if available */
1710

1811
/**
1912
* Porter Stemmer

0 commit comments

Comments
 (0)