-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathtutorial.html
55 lines (49 loc) · 1.61 KB
/
tutorial.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
<!DOCTYPE html>
<html lang="en">
<head>
<title>LTK on MicroPython</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="stylesheet" href="https://pyscript.net/releases/2024.10.2/core.css">
<script type="module" src="https://pyscript.net/releases/2024.10.2/core.js"></script>
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script src="https://code.jquery.com/ui/1.13.2/jquery-ui.js"></script>
<script src=" https://cdnjs.cloudflare.com/ajax/libs/leader-line/1.0.3/leader-line.min.js"></script>
<link rel="stylesheet" href="https://code.jquery.com/ui/1.13.2/themes/base/jquery-ui.css">
</head>
<body>
<py-config>
[files]
"ltk/jquery.py" = "ltk/jquery.py"
"ltk/widgets.py" = "ltk/widgets.py"
"ltk/pubsub.py" = "ltk/pubsub.py"
"ltk/__init__.py" = "ltk/__init__.py"
"ltk/logger.py" = "ltk/logger.py"
"ltk/ltk.js" = "ltk/ltk.js"
"ltk/ltk.css" = "ltk/ltk.css"
</py-config>
<script type="py">
import ltk
def show_tutorial():
print("show tutorial")
try:
ltk.Tutorial([
(
"#show-button",
"click",
ltk.Preformatted("This is an LTK Tutorial").css("font-size", "2em"),
)
]).run()
except Exception as e:
print(e)
(
ltk.VBox(
ltk.Text("Tutorial Demo"),
ltk.Button("Show the tutorial", lambda event: show_tutorial())
.attr("id", "show-button")
)
.appendTo(ltk.window.document.body)
)
</script>
</body>
</html>