Skip to content

Commit 27d7fec

Browse files
Deploy: 50a443a
1 parent 90d20ae commit 27d7fec

34 files changed

Lines changed: 1936 additions & 491 deletions

_modules/index.html

Lines changed: 70 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
<meta name="viewport" content="width=device-width,initial-scale=1"/>
55
<meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="../genindex.html" /><link rel="search" title="Search" href="../search.html" />
66

7-
<!-- Generated with Sphinx 7.2.6 and Furo 2024.01.29 -->
7+
<!-- Generated with Sphinx 7.3.7 and Furo 2024.05.06 -->
88
<title>Overview: module code - mkl_random 1.2.5 documentation</title>
99
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=a746c00c" />
10-
<link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?v=135e06be" />
11-
<link rel="stylesheet" type="text/css" href="../_static/design-style.1e8bd061cd6da7fc9cf755528e8ffc24.min.css?v=0a3b3ea7" />
10+
<link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?v=387cc868" />
11+
<link rel="stylesheet" type="text/css" href="../_static/sphinx-design.min.css?v=87e54e7c" />
1212
<link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?v=36a5483c" />
1313

1414

@@ -68,7 +68,7 @@
6868
<symbol id="svg-sun" viewBox="0 0 24 24">
6969
<title>Light mode</title>
7070
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
71-
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
71+
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
7272
<circle cx="12" cy="12" r="5"></circle>
7373
<line x1="12" y1="1" x2="12" y2="3"></line>
7474
<line x1="12" y1="21" x2="12" y2="23"></line>
@@ -83,15 +83,15 @@
8383
<symbol id="svg-moon" viewBox="0 0 24 24">
8484
<title>Dark mode</title>
8585
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
86-
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
86+
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
8787
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
8888
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
8989
</svg>
9090
</symbol>
9191
<symbol id="svg-sun-half" viewBox="0 0 24 24">
9292
<title>Auto light/dark mode</title>
9393
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
94-
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-shadow">
94+
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-shadow">
9595
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
9696
<circle cx="12" cy="12" r="9" />
9797
<path d="M13 12h5" />
@@ -101,6 +101,60 @@
101101
<path d="M13 6h1" />
102102
</svg>
103103
</symbol>
104+
<symbol id="svg-sun-with-moon" viewBox="0 0 24 24">
105+
<title>Auto light/dark, in light mode</title>
106+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
107+
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
108+
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
109+
<path style="opacity: 50%" d="M 5.411 14.504 C 5.471 14.504 5.532 14.504 5.591 14.504 C 3.639 16.319 4.383 19.569 6.931 20.352 C 7.693 20.586 8.512 20.551 9.25 20.252 C 8.023 23.207 4.056 23.725 2.11 21.184 C 0.166 18.642 1.702 14.949 4.874 14.536 C 5.051 14.512 5.231 14.5 5.411 14.5 L 5.411 14.504 Z"/>
110+
<line x1="14.5" y1="3.25" x2="14.5" y2="1.25"/>
111+
<line x1="14.5" y1="15.85" x2="14.5" y2="17.85"/>
112+
<line x1="10.044" y1="5.094" x2="8.63" y2="3.68"/>
113+
<line x1="19" y1="14.05" x2="20.414" y2="15.464"/>
114+
<line x1="8.2" y1="9.55" x2="6.2" y2="9.55"/>
115+
<line x1="20.8" y1="9.55" x2="22.8" y2="9.55"/>
116+
<line x1="10.044" y1="14.006" x2="8.63" y2="15.42"/>
117+
<line x1="19" y1="5.05" x2="20.414" y2="3.636"/>
118+
<circle cx="14.5" cy="9.55" r="3.6"/>
119+
</svg>
120+
</symbol>
121+
<symbol id="svg-moon-with-sun" viewBox="0 0 24 24">
122+
<title>Auto light/dark, in dark mode</title>
123+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
124+
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
125+
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
126+
<path d="M 8.282 7.007 C 8.385 7.007 8.494 7.007 8.595 7.007 C 5.18 10.184 6.481 15.869 10.942 17.24 C 12.275 17.648 13.706 17.589 15 17.066 C 12.851 22.236 5.91 23.143 2.505 18.696 C -0.897 14.249 1.791 7.786 7.342 7.063 C 7.652 7.021 7.965 7 8.282 7 L 8.282 7.007 Z"/>
127+
<line style="opacity: 50%" x1="18" y1="3.705" x2="18" y2="2.5"/>
128+
<line style="opacity: 50%" x1="18" y1="11.295" x2="18" y2="12.5"/>
129+
<line style="opacity: 50%" x1="15.316" y1="4.816" x2="14.464" y2="3.964"/>
130+
<line style="opacity: 50%" x1="20.711" y1="10.212" x2="21.563" y2="11.063"/>
131+
<line style="opacity: 50%" x1="14.205" y1="7.5" x2="13.001" y2="7.5"/>
132+
<line style="opacity: 50%" x1="21.795" y1="7.5" x2="23" y2="7.5"/>
133+
<line style="opacity: 50%" x1="15.316" y1="10.184" x2="14.464" y2="11.036"/>
134+
<line style="opacity: 50%" x1="20.711" y1="4.789" x2="21.563" y2="3.937"/>
135+
<circle style="opacity: 50%" cx="18" cy="7.5" r="2.169"/>
136+
</svg>
137+
</symbol>
138+
<symbol id="svg-pencil" viewBox="0 0 24 24">
139+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
140+
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-pencil-code">
141+
<path d="M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4" />
142+
<path d="M13.5 6.5l4 4" />
143+
<path d="M20 21l2 -2l-2 -2" />
144+
<path d="M17 17l-2 2l2 2" /
145+
</svg>
146+
</symbol>
147+
<symbol id="svg-eye" viewBox="0 0 24 24">
148+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
149+
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-eye-code">
150+
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
151+
<path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" />
152+
<path
153+
d="M11.11 17.958c-3.209 -.307 -5.91 -2.293 -8.11 -5.958c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6c-.21 .352 -.427 .688 -.647 1.008" />
154+
<path d="M20 21l2 -2l-2 -2" />
155+
<path d="M17 17l-2 2l2 2" />
156+
</svg>
157+
</symbol>
104158
</svg>
105159

106160
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation">
@@ -112,6 +166,8 @@
112166
<div class="visually-hidden">Hide table of contents sidebar</div>
113167
</label>
114168

169+
<a class="skip-to-content muted-link" href="#furo-main-content">Skip to content</a>
170+
115171

116172

117173
<div class="page">
@@ -129,7 +185,8 @@
129185
<div class="theme-toggle-container theme-toggle-header">
130186
<button class="theme-toggle">
131187
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
132-
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
188+
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
189+
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
133190
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
134191
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
135192
</button>
@@ -195,7 +252,8 @@
195252
<div class="theme-toggle-container theme-toggle-content">
196253
<button class="theme-toggle">
197254
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
198-
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
255+
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
256+
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
199257
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
200258
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
201259
</button>
@@ -205,7 +263,7 @@
205263
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
206264
</label>
207265
</div>
208-
<article role="main">
266+
<article role="main" id="furo-main-content">
209267
<h1>All modules for which code is available</h1>
210268
<ul><li><a href="mkl_random/mklrand.html">mkl_random.mklrand</a></li>
211269
</ul>
@@ -241,9 +299,9 @@ <h1>All modules for which code is available</h1>
241299
</aside>
242300
</div>
243301
</div><script src="../_static/documentation_options.js?v=36f53d34"></script>
244-
<script src="../_static/doctools.js?v=888ff710"></script>
302+
<script src="../_static/doctools.js?v=9a2dae69"></script>
245303
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
246-
<script src="../_static/scripts/furo.js?v=32e29ea5"></script>
247-
<script src="../_static/design-tabs.js?v=36754332"></script>
304+
<script src="../_static/scripts/furo.js?v=4e2eecee"></script>
305+
<script src="../_static/design-tabs.js?v=f930bc37"></script>
248306
</body>
249307
</html>
Lines changed: 89 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,101 @@
1-
var sd_labels_by_text = {};
1+
// @ts-check
22

3+
// Extra JS capability for selected tabs to be synced
4+
// The selection is stored in local storage so that it persists across page loads.
5+
6+
/**
7+
* @type {Record<string, HTMLElement[]>}
8+
*/
9+
let sd_id_to_elements = {};
10+
const storageKeyPrefix = "sphinx-design-tab-id-";
11+
12+
/**
13+
* Create a key for a tab element.
14+
* @param {HTMLElement} el - The tab element.
15+
* @returns {[string, string, string] | null} - The key.
16+
*
17+
*/
18+
function create_key(el) {
19+
let syncId = el.getAttribute("data-sync-id");
20+
let syncGroup = el.getAttribute("data-sync-group");
21+
if (!syncId || !syncGroup) return null;
22+
return [syncGroup, syncId, syncGroup + "--" + syncId];
23+
}
24+
25+
/**
26+
* Initialize the tab selection.
27+
*
28+
*/
329
function ready() {
4-
const li = document.getElementsByClassName("sd-tab-label");
5-
for (const label of li) {
6-
syncId = label.getAttribute("data-sync-id");
7-
if (syncId) {
8-
label.onclick = onLabelClick;
9-
if (!sd_labels_by_text[syncId]) {
10-
sd_labels_by_text[syncId] = [];
30+
// Find all tabs with sync data
31+
32+
/** @type {string[]} */
33+
let groups = [];
34+
35+
document.querySelectorAll(".sd-tab-label").forEach((label) => {
36+
if (label instanceof HTMLElement) {
37+
let data = create_key(label);
38+
if (data) {
39+
let [group, id, key] = data;
40+
41+
// add click event listener
42+
// @ts-ignore
43+
label.onclick = onSDLabelClick;
44+
45+
// store map of key to elements
46+
if (!sd_id_to_elements[key]) {
47+
sd_id_to_elements[key] = [];
48+
}
49+
sd_id_to_elements[key].push(label);
50+
51+
if (groups.indexOf(group) === -1) {
52+
groups.push(group);
53+
// Check if a specific tab has been selected via URL parameter
54+
const tabParam = new URLSearchParams(window.location.search).get(
55+
group
56+
);
57+
if (tabParam) {
58+
console.log(
59+
"sphinx-design: Selecting tab id for group '" +
60+
group +
61+
"' from URL parameter: " +
62+
tabParam
63+
);
64+
window.sessionStorage.setItem(storageKeyPrefix + group, tabParam);
65+
}
66+
}
67+
68+
// Check is a specific tab has been selected previously
69+
let previousId = window.sessionStorage.getItem(
70+
storageKeyPrefix + group
71+
);
72+
if (previousId === id) {
73+
// console.log(
74+
// "sphinx-design: Selecting tab from session storage: " + id
75+
// );
76+
// @ts-ignore
77+
label.previousElementSibling.checked = true;
78+
}
1179
}
12-
sd_labels_by_text[syncId].push(label);
1380
}
14-
}
81+
});
1582
}
1683

17-
function onLabelClick() {
18-
// Activate other inputs with the same sync id.
19-
syncId = this.getAttribute("data-sync-id");
20-
for (label of sd_labels_by_text[syncId]) {
84+
/**
85+
* Activate other tabs with the same sync id.
86+
*
87+
* @this {HTMLElement} - The element that was clicked.
88+
*/
89+
function onSDLabelClick() {
90+
let data = create_key(this);
91+
if (!data) return;
92+
let [group, id, key] = data;
93+
for (const label of sd_id_to_elements[key]) {
2194
if (label === this) continue;
95+
// @ts-ignore
2296
label.previousElementSibling.checked = true;
2397
}
24-
window.localStorage.setItem("sphinx-design-last-tab", syncId);
98+
window.sessionStorage.setItem(storageKeyPrefix + group, id);
2599
}
26100

27101
document.addEventListener("DOMContentLoaded", ready, false);

_sphinx_design_static/sphinx-design.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.

_static/basic.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Sphinx stylesheet -- basic theme.
66
*
7-
* :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
7+
* :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
88
* :license: BSD, see LICENSE for details.
99
*
1010
*/

_static/design-tabs.js

Lines changed: 89 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,101 @@
1-
var sd_labels_by_text = {};
1+
// @ts-check
22

3+
// Extra JS capability for selected tabs to be synced
4+
// The selection is stored in local storage so that it persists across page loads.
5+
6+
/**
7+
* @type {Record<string, HTMLElement[]>}
8+
*/
9+
let sd_id_to_elements = {};
10+
const storageKeyPrefix = "sphinx-design-tab-id-";
11+
12+
/**
13+
* Create a key for a tab element.
14+
* @param {HTMLElement} el - The tab element.
15+
* @returns {[string, string, string] | null} - The key.
16+
*
17+
*/
18+
function create_key(el) {
19+
let syncId = el.getAttribute("data-sync-id");
20+
let syncGroup = el.getAttribute("data-sync-group");
21+
if (!syncId || !syncGroup) return null;
22+
return [syncGroup, syncId, syncGroup + "--" + syncId];
23+
}
24+
25+
/**
26+
* Initialize the tab selection.
27+
*
28+
*/
329
function ready() {
4-
const li = document.getElementsByClassName("sd-tab-label");
5-
for (const label of li) {
6-
syncId = label.getAttribute("data-sync-id");
7-
if (syncId) {
8-
label.onclick = onLabelClick;
9-
if (!sd_labels_by_text[syncId]) {
10-
sd_labels_by_text[syncId] = [];
30+
// Find all tabs with sync data
31+
32+
/** @type {string[]} */
33+
let groups = [];
34+
35+
document.querySelectorAll(".sd-tab-label").forEach((label) => {
36+
if (label instanceof HTMLElement) {
37+
let data = create_key(label);
38+
if (data) {
39+
let [group, id, key] = data;
40+
41+
// add click event listener
42+
// @ts-ignore
43+
label.onclick = onSDLabelClick;
44+
45+
// store map of key to elements
46+
if (!sd_id_to_elements[key]) {
47+
sd_id_to_elements[key] = [];
48+
}
49+
sd_id_to_elements[key].push(label);
50+
51+
if (groups.indexOf(group) === -1) {
52+
groups.push(group);
53+
// Check if a specific tab has been selected via URL parameter
54+
const tabParam = new URLSearchParams(window.location.search).get(
55+
group
56+
);
57+
if (tabParam) {
58+
console.log(
59+
"sphinx-design: Selecting tab id for group '" +
60+
group +
61+
"' from URL parameter: " +
62+
tabParam
63+
);
64+
window.sessionStorage.setItem(storageKeyPrefix + group, tabParam);
65+
}
66+
}
67+
68+
// Check is a specific tab has been selected previously
69+
let previousId = window.sessionStorage.getItem(
70+
storageKeyPrefix + group
71+
);
72+
if (previousId === id) {
73+
// console.log(
74+
// "sphinx-design: Selecting tab from session storage: " + id
75+
// );
76+
// @ts-ignore
77+
label.previousElementSibling.checked = true;
78+
}
1179
}
12-
sd_labels_by_text[syncId].push(label);
1380
}
14-
}
81+
});
1582
}
1683

17-
function onLabelClick() {
18-
// Activate other inputs with the same sync id.
19-
syncId = this.getAttribute("data-sync-id");
20-
for (label of sd_labels_by_text[syncId]) {
84+
/**
85+
* Activate other tabs with the same sync id.
86+
*
87+
* @this {HTMLElement} - The element that was clicked.
88+
*/
89+
function onSDLabelClick() {
90+
let data = create_key(this);
91+
if (!data) return;
92+
let [group, id, key] = data;
93+
for (const label of sd_id_to_elements[key]) {
2194
if (label === this) continue;
95+
// @ts-ignore
2296
label.previousElementSibling.checked = true;
2397
}
24-
window.localStorage.setItem("sphinx-design-last-tab", syncId);
98+
window.sessionStorage.setItem(storageKeyPrefix + group, id);
2599
}
26100

27101
document.addEventListener("DOMContentLoaded", ready, false);

0 commit comments

Comments
 (0)