Skip to content

Commit a5a6653

Browse files
committed
Deployed 022b83b with MkDocs version: 1.6.1
1 parent d9d11ab commit a5a6653

32 files changed

Lines changed: 4519 additions & 1418 deletions

404.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

assets/_markdown_exec_pyodide.css

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ html[data-theme="dark"] {
1313

1414
.pyodide-editor {
1515
width: 100%;
16-
min-height: 200px;
17-
max-height: 400px;
1816
font-size: .85em;
1917
}
2018

@@ -47,4 +45,9 @@ html[data-theme="dark"] {
4745
.pyodide-clickable {
4846
cursor: pointer;
4947
text-align: right;
50-
}
48+
}
49+
50+
/* For themes other than Material. */
51+
.pyodide .twemoji svg {
52+
width: 1rem;
53+
}

assets/_markdown_exec_pyodide.js

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ function clearOutput(element) {
1616
}
1717

1818
async function evaluatePython(pyodide, editor, output, session) {
19-
pyodide.setStdout({ batched: (string) => { writeOutput(output, string); } });
19+
pyodide.setStdout({ batched: (string) => { writeOutput(output, new Option(string).innerHTML); } });
2020
let result, code = editor.getValue();
2121
clearOutput(output);
2222
try {
2323
result = await pyodide.runPythonAsync(code, { globals: getSession(session, pyodide) });
2424
} catch (error) {
25-
writeOutput(output, error);
25+
writeOutput(output, new Option(error.toString()).innerHTML);
2626
}
27-
if (result) writeOutput(output, result);
27+
if (result) writeOutput(output, new Option(result).innerHTML);
2828
hljs.highlightElement(output);
2929
}
3030

@@ -77,7 +77,15 @@ function updateTheme(editor, light, dark) {
7777
});
7878
}
7979

80-
async function setupPyodide(idPrefix, install = null, themeLight = 'tomorrow', themeDark = 'tomorrow_night', session = null) {
80+
async function setupPyodide(
81+
idPrefix,
82+
install = null,
83+
themeLight = 'tomorrow',
84+
themeDark = 'tomorrow_night',
85+
session = null,
86+
minLines = 5,
87+
maxLines = 30,
88+
) {
8189
const editor = ace.edit(idPrefix + "editor");
8290
const run = document.getElementById(idPrefix + "run");
8391
const clear = document.getElementById(idPrefix + "clear");
@@ -88,14 +96,28 @@ async function setupPyodide(idPrefix, install = null, themeLight = 'tomorrow', t
8896
editor.session.setMode("ace/mode/python");
8997
setTheme(editor, getTheme(), themeLight, themeDark);
9098

99+
editor.setOption("minLines", minLines);
100+
editor.setOption("maxLines", maxLines);
101+
102+
// Force editor to resize after setting options
103+
editor.resize();
104+
91105
writeOutput(output, "Initializing...");
92106
let pyodide = await pyodidePromise;
93107
if (install && install.length) {
94-
micropip = pyodide.pyimport("micropip");
95-
for (const package of install)
96-
await micropip.install(package);
108+
try {
109+
micropip = pyodide.pyimport("micropip");
110+
for (const package of install)
111+
await micropip.install(package);
112+
clearOutput(output);
113+
} catch (error) {
114+
clearOutput(output);
115+
writeOutput(output, `Could not install one or more packages: ${install.join(", ")}\n`);
116+
writeOutput(output, new Option(error.toString()).innerHTML);
117+
}
118+
} else {
119+
clearOutput(output);
97120
}
98-
clearOutput(output);
99121
run.onclick = () => evaluatePython(pyodide, editor, output, session);
100122
clear.onclick = () => clearOutput(output);
101123
output.parentElement.parentElement.addEventListener("keydown", (event) => {

assets/_mkdocstrings.css

Lines changed: 68 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
display: inline;
1111
}
1212

13+
/* No text transformation from Material for MkDocs for H5 headings. */
14+
.md-typeset h5 .doc-object-name {
15+
text-transform: none;
16+
}
17+
1318
/* Max width for docstring sections tables. */
1419
.doc .md-typeset__table,
1520
.doc .md-typeset__table table {
@@ -31,6 +36,11 @@
3136
display: inline;
3237
}
3338

39+
/* Default font size for parameter headings. */
40+
.md-typeset .doc-heading-parameter {
41+
font-size: inherit;
42+
}
43+
3444
/* Prefer space on the right, not the left of parameter permalinks. */
3545
.doc-heading-parameter .headerlink {
3646
margin-left: 0 !important;
@@ -42,6 +52,28 @@
4252
font-weight: bold;
4353
}
4454

55+
/* Backlinks crumb separator. */
56+
.doc-backlink-crumb {
57+
display: inline-flex;
58+
gap: .2rem;
59+
white-space: nowrap;
60+
align-items: center;
61+
vertical-align: middle;
62+
}
63+
.doc-backlink-crumb:not(:first-child)::before {
64+
background-color: var(--md-default-fg-color--lighter);
65+
content: "";
66+
display: inline;
67+
height: 1rem;
68+
--md-path-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.59 16.58 13.17 12 8.59 7.41 10 6l6 6-6 6z"/></svg>');
69+
-webkit-mask-image: var(--md-path-icon);
70+
mask-image: var(--md-path-icon);
71+
width: 1rem;
72+
}
73+
.doc-backlink-crumb.last {
74+
font-weight: bold;
75+
}
76+
4577
/* Symbols in Navigation and ToC. */
4678
:root, :host,
4779
[data-md-color-scheme="default"] {
@@ -83,7 +115,8 @@ code.doc-symbol {
83115
font-weight: bold;
84116
}
85117

86-
code.doc-symbol-parameter {
118+
code.doc-symbol-parameter,
119+
a code.doc-symbol-parameter {
87120
color: var(--doc-symbol-parameter-fg-color);
88121
background-color: var(--doc-symbol-parameter-bg-color);
89122
}
@@ -92,7 +125,8 @@ code.doc-symbol-parameter::after {
92125
content: "param";
93126
}
94127

95-
code.doc-symbol-attribute {
128+
code.doc-symbol-attribute,
129+
a code.doc-symbol-attribute {
96130
color: var(--doc-symbol-attribute-fg-color);
97131
background-color: var(--doc-symbol-attribute-bg-color);
98132
}
@@ -101,7 +135,8 @@ code.doc-symbol-attribute::after {
101135
content: "attr";
102136
}
103137

104-
code.doc-symbol-function {
138+
code.doc-symbol-function,
139+
a code.doc-symbol-function {
105140
color: var(--doc-symbol-function-fg-color);
106141
background-color: var(--doc-symbol-function-bg-color);
107142
}
@@ -110,7 +145,8 @@ code.doc-symbol-function::after {
110145
content: "func";
111146
}
112147

113-
code.doc-symbol-method {
148+
code.doc-symbol-method,
149+
a code.doc-symbol-method {
114150
color: var(--doc-symbol-method-fg-color);
115151
background-color: var(--doc-symbol-method-bg-color);
116152
}
@@ -119,7 +155,8 @@ code.doc-symbol-method::after {
119155
content: "meth";
120156
}
121157

122-
code.doc-symbol-class {
158+
code.doc-symbol-class,
159+
a code.doc-symbol-class {
123160
color: var(--doc-symbol-class-fg-color);
124161
background-color: var(--doc-symbol-class-bg-color);
125162
}
@@ -128,7 +165,8 @@ code.doc-symbol-class::after {
128165
content: "class";
129166
}
130167

131-
code.doc-symbol-module {
168+
code.doc-symbol-module,
169+
a code.doc-symbol-module {
132170
color: var(--doc-symbol-module-fg-color);
133171
background-color: var(--doc-symbol-module-bg-color);
134172
}
@@ -141,3 +179,27 @@ code.doc-symbol-module::after {
141179
color: inherit;
142180
border-bottom: 1px dotted currentcolor;
143181
}
182+
183+
/* Source code blocks (admonitions). */
184+
:root {
185+
--md-admonition-icon--mkdocstrings-source: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.22 4.97a.75.75 0 0 1 1.06 0l6.5 6.5a.75.75 0 0 1 0 1.06l-6.5 6.5a.749.749 0 0 1-1.275-.326.75.75 0 0 1 .215-.734L21.19 12l-5.97-5.97a.75.75 0 0 1 0-1.06m-6.44 0a.75.75 0 0 1 0 1.06L2.81 12l5.97 5.97a.749.749 0 0 1-.326 1.275.75.75 0 0 1-.734-.215l-6.5-6.5a.75.75 0 0 1 0-1.06l6.5-6.5a.75.75 0 0 1 1.06 0"/></svg>')
186+
}
187+
.md-typeset .admonition.mkdocstrings-source,
188+
.md-typeset details.mkdocstrings-source {
189+
border: none;
190+
padding: 0;
191+
}
192+
.md-typeset .admonition.mkdocstrings-source:focus-within,
193+
.md-typeset details.mkdocstrings-source:focus-within {
194+
box-shadow: none;
195+
}
196+
.md-typeset .mkdocstrings-source > .admonition-title,
197+
.md-typeset .mkdocstrings-source > summary {
198+
background-color: inherit;
199+
}
200+
.md-typeset .mkdocstrings-source > .admonition-title::before,
201+
.md-typeset .mkdocstrings-source > summary::before {
202+
background-color: var(--md-default-fg-color);
203+
-webkit-mask-image: var(--md-admonition-icon--mkdocstrings-source);
204+
mask-image: var(--md-admonition-icon--mkdocstrings-source);
205+
}

assets/javascripts/bundle.5a789024.min.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

assets/javascripts/bundle.5c86578b.min.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/javascripts/workers/search.c7c1ca2c.min.js renamed to assets/javascripts/workers/search.ad38c271.min.js

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

assets/stylesheets/main.8cce3a28.min.css

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

assets/stylesheets/main.957d08c0.min.css

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog/index.html

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)