Skip to content

Commit 56bb94f

Browse files
committed
0 parents  commit 56bb94f

File tree

107 files changed

+24229
-0
lines changed

Some content is hidden

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

107 files changed

+24229
-0
lines changed

.buildinfo

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Sphinx build info version 1
2+
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3+
config: f5b4fa78b3c1a18daabb131c55555a42
4+
tags: 645f666f9bcd5a90fca523b33c5a78b7

.nojekyll

Whitespace-only changes.

PyodideServiceWorker.js

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
const appName = 'nbsite'
2+
const appCacheName = 'nbsite-0.8.6a5';
3+
4+
const preCacheFiles = [];
5+
6+
const cachePatterns = ['https://cdn.holoviz.org/panel/1.4.2/dist/', 'https://cdn.bokeh.org/bokeh/', 'https://cdn.jsdelivr.net/pyodide/', 'https://files.pythonhosted.org/packages/', 'https://pypi.org/pypi/'];
7+
8+
self.addEventListener('install', (e) => {
9+
console.log('[Service Worker] Install');
10+
self.skipWaiting();
11+
e.waitUntil((async () => {
12+
const cacheNames = await caches.keys();
13+
for (const cacheName of cacheNames) {
14+
if (cacheName.startsWith(appName) && cacheName !== appCacheName) {
15+
console.log(`[Service Worker] Delete old cache ${cacheName}`);
16+
caches.delete(cacheName);
17+
}
18+
}
19+
const cache = await caches.open(appCacheName);
20+
if (preCacheFiles.length) {
21+
console.log('[Service Worker] Precaching ');
22+
}
23+
preCacheFiles.forEach(async (cacheFile) => {
24+
const request = new Request(cacheFile);
25+
const response = await fetch(request);
26+
if (response.ok || response.type == 'opaque') {
27+
cache.put(request, response);
28+
}
29+
})
30+
})());
31+
});
32+
33+
self.addEventListener('activate', (event) => {
34+
console.log('[Service Worker] Activating');
35+
return self.clients.claim();
36+
});
37+
38+
self.addEventListener('fetch', (e) => {
39+
if (e.request.method !== 'GET') {
40+
return
41+
}
42+
e.respondWith((async () => {
43+
const cache = await caches.open(appCacheName);
44+
let response = await cache.match(e.request);
45+
console.log(`[Service Worker] Fetching resource: ${e.request.url}`);
46+
if (response) {
47+
return response;
48+
}
49+
response = await fetch(e.request);
50+
if (!response.ok && !(response.type == 'opaque')) {
51+
throw Error(`[Service Worker] Fetching resource ${e.request.url} failed with response: ${response.status}`);
52+
}
53+
console.log(`[Service Worker] Caching new resource: ${e.request.url}`);
54+
cache.put(e.request, response.clone());
55+
return response;
56+
})());
57+
});

_images/example1.png

32.3 KB
Loading

_images/example2.png

32.3 KB
Loading

_images/thing1.png

32.3 KB
Loading

_images/thing2.png

32.3 KB
Loading

_rediraffe_redirected.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

_sphinx_design_static/design-style.1e8bd061cd6da7fc9cf755528e8ffc24.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.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
var sd_labels_by_text = {};
2+
3+
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] = [];
11+
}
12+
sd_labels_by_text[syncId].push(label);
13+
}
14+
}
15+
}
16+
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]) {
21+
if (label === this) continue;
22+
label.previousElementSibling.checked = true;
23+
}
24+
window.localStorage.setItem("sphinx-design-last-tab", syncId);
25+
}
26+
27+
document.addEventListener("DOMContentLoaded", ready, false);

0 commit comments

Comments
 (0)