generated from ntoll/codespaces-project-template-pyscript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
101 lines (87 loc) · 3.34 KB
/
index.html
File metadata and controls
101 lines (87 loc) · 3.34 KB
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<!-- PyScript CSS -->
<link rel="stylesheet" href="https://pyscript.net/releases/2024.1.1/core.css">
<link rel="stylesheet" href="./assets/css/examples.css" />
<script type="module" src="https://pyscript.net/releases/2024.1.1/core.js"></script>
<style>
#loading { outline: none; border: none; background: transparent }
</style>
<script type="module">
const loading = document.getElementById('loading');
addEventListener('py:ready', () => loading.close());
loading.showModal();
</script>
<!-- will be set via PyDom -->
<title id="header-title"></title>
<link rel="icon" type="image/png" href="./assets/favicon.png" />
</head>
<body>
<dialog id="loading">
<h1>Loading...</h1>
</dialog>
<nav class="navbar" style="background-color: #000000">
<div class="app-header">
<a href="/">
<img src="./assets/logo.png" class="logo" />
</a>
<a class="title" id="page-title" href="" style="color: #f0ab3c"></a>
</div>
</nav>
<br />
<div id="page-message"></div>
<!-- Dropdown for Client Selection -->
<div id="client-dropdown">
<select id="client-selector">
<!-- Dropdown options will be populated dynamically by PyScript -->
<option value="flounders">Flounders</option>
<option value="biocell">Biocell</option>
</select>
</div>
<!--file_input_html = "<input type='file' id='file-input' accept='.csv'><button id='btn-load'>Load Local File</button>"-->
<div id="pandas-source">
<h3>Data Source: Local File Upload</h3>
<!-- Input for URL -->
<input type="file" id="file-input" class="py-input" size="70" />
<!-- Button to trigger DataFrame loading -->
<button
type="submit"
id="btn-csv-load"
class="py-button"
py-click="loadFromFile"
>
Display Dataframe from CSV
</button>
</div>
<div id="pandas-source">
<h3>Data Source: URL</h3>
<!-- Input for URL -->
<input type="text" id="txt-url" class="py-input" size="70" />
<!-- Button to trigger DataFrame loading -->
<button
type="submit"
id="btn-url-load"
class="py-button"
py-click="loadFromURL"
>
Display Dataframe from URL
</button>
</div>
<!-- File input dynamically populated via PyDom -->
<div id="file-input-container"></div>
<div id="pandas-output" hidden>
<h3>Output</h3>
<div id="pandas-output-inner"></div>
</div>
<div id="pandas-dev-console" hidden>
<h3>Dev Console</h3>
<script type="py" terminal></script>
</div>
<section class="pyscript">
<script type="py" src="./main.py" config="./pyscript.toml"></script>
</section>
</body>
</html>