Skip to content

Commit c81174d

Browse files
Merge pull request #8 from pyscript/add-splashscreens
add splashcreen to all examples
2 parents fec1829 + 3c4bbb8 commit c81174d

File tree

18 files changed

+252
-0
lines changed

18 files changed

+252
-0
lines changed

altair/index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,25 @@
1414
<!-- This script tag bootstraps PyScript -->
1515
<script type="module" src="https://pyscript.net/releases/2023.11.2/core.js"></script>
1616

17+
<!-- for splashscreen -->
18+
<style>
19+
#loading { outline: none; border: none; background: transparent }
20+
</style>
21+
<script type="module">
22+
const loading = document.getElementById('loading');
23+
addEventListener('py:ready', () => loading.close());
24+
loading.showModal();
25+
</script>
26+
1727
<title>Altair</title>
1828
<link rel="icon" type="image/png" href="./assets/favicon.png" />
1929
</head>
2030

2131
<body>
32+
<dialog id="loading">
33+
<h1>Loading...</h1>
34+
</dialog>
35+
2236
<nav class="navbar" style="background-color: #000000">
2337
<div class="app-header">
2438
<a href="/">

antigravity/index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,25 @@
1414
<!-- This script tag bootstraps PyScript -->
1515
<script type="module" src="https://pyscript.net/releases/2023.11.2/core.js"></script>
1616

17+
<!-- for splashscreen -->
18+
<style>
19+
#loading { outline: none; border: none; background: transparent }
20+
</style>
21+
<script type="module">
22+
const loading = document.getElementById('loading');
23+
addEventListener('py:ready', () => loading.close());
24+
loading.showModal();
25+
</script>
26+
1727
<title>Antigravity</title>
1828
<link rel="icon" type="image/png" href="./assets/favicon.png" />
1929
</head>
2030

2131
<body>
32+
<dialog id="loading">
33+
<h1>Loading...</h1>
34+
</dialog>
35+
2236
<nav class="navbar" style="background-color: #000000">
2337
<div class="app-header">
2438
<a href="/">

bokeh/index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@
1414
<!-- This script tag bootstraps PyScript -->
1515
<script type="module" src="https://pyscript.net/releases/2023.11.2/core.js"></script>
1616

17+
<!-- for splashscreen -->
18+
<style>
19+
#loading { outline: none; border: none; background: transparent }
20+
</style>
21+
<script type="module">
22+
const loading = document.getElementById('loading');
23+
addEventListener('py:ready', () => loading.close());
24+
loading.showModal();
25+
</script>
26+
1727
<title>Bokeh Example</title>
1828
<link rel="icon" type="image/png" href="./assets/favicon.png" />
1929

@@ -29,6 +39,10 @@
2939
</head>
3040

3141
<body>
42+
<dialog id="loading">
43+
<h1>Loading...</h1>
44+
</dialog>
45+
3246
<nav class="navbar" style="background-color: #000000">
3347
<div class="app-header">
3448
<a href="/">

d3/index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@
1414
<!-- This script tag bootstraps PyScript -->
1515
<script type="module" src="https://pyscript.net/releases/2023.11.2/core.js"></script>
1616

17+
<!-- for splashscreen -->
18+
<style>
19+
#loading { outline: none; border: none; background: transparent }
20+
</style>
21+
<script type="module">
22+
const loading = document.getElementById('loading');
23+
addEventListener('py:ready', () => loading.close());
24+
loading.showModal();
25+
</script>
26+
1727
<title>D3 Visualization</title>
1828
<link rel="icon" type="image/png" href="./assets/favicon.png" />
1929

@@ -39,6 +49,10 @@
3949
</head>
4050

4151
<body>
52+
<dialog id="loading">
53+
<h1>Loading...</h1>
54+
</dialog>
55+
4256
<nav class="navbar" style="background-color: #000000">
4357
<div class="app-header">
4458
<a href="/">

folium/index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,25 @@
1414
<!-- This script tag bootstraps PyScript -->
1515
<script type="module" src="https://pyscript.net/releases/2023.11.2/core.js"></script>
1616

17+
<!-- for splashscreen -->
18+
<style>
19+
#loading { outline: none; border: none; background: transparent }
20+
</style>
21+
<script type="module">
22+
const loading = document.getElementById('loading');
23+
addEventListener('py:ready', () => loading.close());
24+
loading.showModal();
25+
</script>
26+
1727
<title>Folium</title>
1828
<link rel="icon" type="image/png" href="./assets/favicon.png" />
1929
</head>
2030

2131
<body>
32+
<dialog id="loading">
33+
<h1>Loading...</h1>
34+
</dialog>
35+
2236
<nav class="navbar" style="background-color: #000000">
2337
<div class="app-header">
2438
<a href="/">

fractals_with_numpy_and_canvas/index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@
1414
<!-- This script tag bootstraps PyScript -->
1515
<script type="module" src="https://pyscript.net/releases/2023.11.2/core.js"></script>
1616

17+
<!-- for splashscreen -->
18+
<style>
19+
#loading { outline: none; border: none; background: transparent }
20+
</style>
21+
<script type="module">
22+
const loading = document.getElementById('loading');
23+
addEventListener('py:ready', () => loading.close());
24+
loading.showModal();
25+
</script>
26+
1727
<title>Fractals with NumPy and canvas</title>
1828
<link rel="icon" type="image/png" href="./assets/favicon.png" />
1929

@@ -43,6 +53,10 @@
4353
</head>
4454

4555
<body>
56+
<dialog id="loading">
57+
<h1>Loading...</h1>
58+
</dialog>
59+
4660
<nav class="navbar" style="background-color: #000000">
4761
<div class="app-header">
4862
<a href="/">

hello_world/index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,25 @@
1414
<!-- This script tag bootstraps PyScript -->
1515
<script type="module" src="https://pyscript.net/releases/2023.11.2/core.js"></script>
1616

17+
<!-- for splashscreen -->
18+
<style>
19+
#loading { outline: none; border: none; background: transparent }
20+
</style>
21+
<script type="module">
22+
const loading = document.getElementById('loading');
23+
addEventListener('py:ready', () => loading.close());
24+
loading.showModal();
25+
</script>
26+
1727
<title>PyScript Hello World</title>
1828
<link rel="icon" type="image/png" href="./assets/favicon.png" />
1929
</head>
2030

2131
<body>
32+
<dialog id="loading">
33+
<h1>Loading...</h1>
34+
</dialog>
35+
2236
<nav class="navbar" style="background-color: #000000">
2337
<div class="app-header">
2438
<a href="/">

icosahedron/index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@
1414
<!-- This script tag bootstraps PyScript -->
1515
<script type="module" src="https://pyscript.net/releases/2023.11.2/core.js"></script>
1616

17+
<!-- for splashscreen -->
18+
<style>
19+
#loading { outline: none; border: none; background: transparent }
20+
</style>
21+
<script type="module">
22+
const loading = document.getElementById('loading');
23+
addEventListener('py:ready', () => loading.close());
24+
loading.showModal();
25+
</script>
26+
1727
<title>Raycaster Icosahedron</title>
1828
<link rel="icon" type="image/png" href="./assets/favicon.png" />
1929

@@ -25,6 +35,10 @@
2535
</head>
2636

2737
<body>
38+
<dialog id="loading">
39+
<h1>Loading...</h1>
40+
</dialog>
41+
2842
<div class="container-fluid fixed-top header disable-selection">
2943
<div class="row">
3044
<div class="col"></div>

matplotlib/index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,25 @@
1414
<!-- This script tag bootstraps PyScript -->
1515
<script type="module" src="https://pyscript.net/releases/2023.11.2/core.js"></script>
1616

17+
<!-- for splashscreen -->
18+
<style>
19+
#loading { outline: none; border: none; background: transparent }
20+
</style>
21+
<script type="module">
22+
const loading = document.getElementById('loading');
23+
addEventListener('py:ready', () => loading.close());
24+
loading.showModal();
25+
</script>
26+
1727
<title>Matplotlib</title>
1828
<link rel="icon" type="image/png" href="./assets/favicon.png" />
1929
</head>
2030

2131
<body>
32+
<dialog id="loading">
33+
<h1>Loading...</h1>
34+
</dialog>
35+
2236
<nav class="navbar" style="background-color: #000000">
2337
<div class="app-header">
2438
<a href="/">

pandas/index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,26 @@
1414
<!-- This script tag bootstraps PyScript -->
1515
<script type="module" src="https://pyscript.net/releases/2023.11.2/core.js"></script>
1616

17+
<!-- for splashscreen -->
18+
<style>
19+
#loading { outline: none; border: none; background: transparent }
20+
</style>
21+
<script type="module">
22+
const loading = document.getElementById('loading');
23+
addEventListener('py:ready', () => loading.close());
24+
loading.showModal();
25+
</script>
26+
1727
<!-- will be set via PyDom -->
1828
<title id="header-title"></title>
1929
<link rel="icon" type="image/png" href="./assets/favicon.png" />
2030
</head>
2131

2232
<body>
33+
<dialog id="loading">
34+
<h1>Loading...</h1>
35+
</dialog>
36+
2337
<nav class="navbar" style="background-color: #000000">
2438
<div class="app-header">
2539
<a href="/">

0 commit comments

Comments
 (0)