-
Notifications
You must be signed in to change notification settings - Fork 10
/
index.html
70 lines (60 loc) · 3.37 KB
/
index.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
<!-- LTK - Copyright 2023 - All Rights Reserved - chrislaffra.com - See LICENSE -->
<!DOCTYPE html>
<html lang="en">
<head>
<title>LTK</title>
<meta charset="UTF-8">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<meta name="viewport" content="width=device-width,initial-scale=1">
<script>
/*! coi-serviceworker v0.1.7 - Guido Zuidhof and contributors, licensed under MIT */
/*! mini-coi - Andrea Giammarchi and contributors, licensed under MIT */
(({ document: d, navigator: { serviceWorker: s } }) => {
if (d) {
const { currentScript: c } = d;
s.register(c.src, { scope: c.getAttribute('scope') || '.' }).then(r => {
r.addEventListener('updatefound', () => location.reload());
if (r.active && !s.controller) location.reload();
});
}
else {
addEventListener('install', () => skipWaiting());
addEventListener('activate', e => e.waitUntil(clients.claim()));
addEventListener('fetch', e => {
const { request: r } = e;
if (r.cache === 'only-if-cached' && r.mode !== 'same-origin') return;
e.respondWith(fetch(r).then(r => {
const { body, status, statusText } = r;
if (!status || status > 399) return r;
const h = new Headers(r.headers);
h.set('Cross-Origin-Opener-Policy', 'same-origin');
h.set('Cross-Origin-Embedder-Policy', 'require-corp');
h.set('Cross-Origin-Resource-Policy', 'cross-origin');
return new Response(body, { status, statusText, headers: h });
}));
});
}
})(self);
</script>
<!-- Import PyScript - see kitchensink.js for activation -->
<script type="module" src="https://pyscript.net/releases/2023.11.1/core.js"></script>
<link rel="stylesheet" href="https://pyscript.net/releases/2023.11.1/core.css" />
<!-- Import jQuery - used in ltk/jquery.py -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery-ui.min.js"></script>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.13.2/themes/base/jquery-ui.css"/>
<!-- Codemirror Interactive Editor -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.35.0/codemirror.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/6.65.7/mode/python/python.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/6.65.7/codemirror.min.css" >
<!-- Import Styles for the kitchensink demo -->
<link rel="stylesheet" href="kitchensink.css">
</head>
<body>
<!-- Add a progress animation. This will be removed by main.py -->
<div id="progress"><img src="progress_line.gif"></div>
<h1 id="title">The <a href=https://github.com/laffra/ltk>LTK</a> Kitchensink for PyScript running</h1>
<!-- Load JavaScript logic to choose the Python runtime -->
<script src="kitchensink.js"></script>
</body>
</html>