8000 add files in public folder · shihabuddin413/pyscript@3d613b8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3d613b8

Browse files
committed
add files in public folder
1 parent 00060b2 commit 3d613b8

File tree

6 files changed

+129
-0
lines changed

6 files changed

+129
-0
lines changed

pyscriptjs/public/favicon.png

3.05 KB
Loading

pyscriptjs/public/index.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width,initial-scale=1" />
6+
7+
<title>Svelte app</title>
8+
9+
<link rel="icon" type="image/png" href="favicon.png" />
10+
<link rel="stylesheet" href="build/bundle.css" />
11+
12+
<script defer src="build/bundle.js"></script>
13+
</head>
14+
15+
<body></body>
16+
</html>

pyscriptjs/public/repl.html

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width,initial-scale=1" />
6+
7+
<title>Svelte app</title>
8+
9+
<link rel="icon" type="image/png" href="favicon.png" />
10+
<link rel="stylesheet" href="build/bundle.css" />
11+
12+
<script defer src="build/bundle.js"></script>
13+
</head>
14+
15+
<body>
16+
<div>
17+
<py-repl id="my-repl" auto-generate="true"> </py-repl>
18+
</div>
19+
</body>
20+
</html>

pyscriptjs/public/repl2.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width,initial-scale=1" />
6+
7+
<title>Svelte app</title>
8+
9+
<link rel="icon" type="image/png" href="favicon.png" />
10+
<link rel="stylesheet" href="build/bundle.css" />
11+
12+
<script defer src="build/bundle.js"></script>
13+
</head>
14+
15+
<body>
16+
<div class="w-full h-full">
17+
<div class="flex">
18+
<div class="w-2/3"><py-repl id="my-repl" auto-generate="true" target="output"> </py-repl></div>
19+
<div id="output" class="w-1/3"></div>
20+
</div>
21+
</div>
22+
23+
24+
</body>
25+
</html>

pyscriptjs/public/simple_script.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width,initial-scale=1" />
6+
7+
<title>Svelte app</title>
8+
9+
<link rel="icon" type="image/png" href="favicon.png" />
10+
<link rel="stylesheet" href="build/bundle.css" />
11+
12+
<script defer src="build/bundle.js"></script>
13+
</head>
14+
15+
<body>
16+
<div id="outputDiv" style="background-color:yellow"></div>
17+
<py-script target="outputDiv">
18+
from datetime import datetime
19+
now = datetime.now()
20+
now.strftime("%m/%d/%Y, %H:%M:%S")
21+
</py-script>
22+
</body>
23+
</html>

pyscriptjs/public/simple_script2.html

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width,initial-scale=1" />
6+
7+
<title>Svelte app</title>
8+
9+
<link rel="icon" type="image/png" href="favicon.png" />
10+
<link rel="stylesheet" href="build/bundle.css" />
11+
12+
<script defer src="build/bundle.js"></script>
13+
</head>
14+
15+
<body>
16+
<div id="outputDiv"></div>
17+
<div id="outputDiv2" style="background-color: blueviolet"></div>
18+
<div id="outputDiv3" style="background-color: yellow"></div>
19+
<py-script target="outputDiv">
20+
from datetime import datetime
21+
now = datetime.now()
22+
now.strftime("%m/%d/%Y, %H:%M:%S")
23+
</py-script>
24+
25+
<py-script>
26+
from datetime import datetime
27+
import asyncio
28+
29+
async def foo():
30+
while True:
31+
await asyncio.sleep(1)
32+
now = datetime.now()
33+
output = now.strftime("%m/%d/%Y, %H:%M:%S")
34+
pyscript.write("outputDiv2", output)
35+
36+
out3 = Element("outputDiv3")
37+
if output[-1] in ["0", "4", "8"]:
38+
out3.write("It's espresso time!")
39+
else:
40+
out3.clear()
41+
42+
pyscript.run_until_complete(foo())
43+
</py-script>
44+
</body>
45+
</html>

0 commit comments

Comments
 (0)
0