File tree Expand file tree Collapse file tree 1 file changed +34
-8
lines changed Expand file tree Collapse file tree 1 file changed +34
-8
lines changed Original file line number Diff line number Diff line change 4
4
< meta charset ="utf-8 " />
5
5
< meta name ="viewport " content ="width=device-width,initial-scale=1 " />
6
6
7
- < title > Svelte app </ title >
7
+ < title > PyScript simple script 2 demo </ title >
8
8
9
9
< link rel ="icon " type ="image/png " href ="favicon.png " />
10
- < link rel ="stylesheet " href ="../build/pyscript.css " />
11
-
10
+ <!-- <link rel="stylesheet" href="../build/pyscript.css" /> -->
12
11
< script defer src ="../build/pyscript.js "> </ script >
13
12
< py-env >
14
- - paths:
15
- - /utils.py
13
+ - paths:
14
+ - /utils.py
16
15
</ py-env >
17
16
</ head >
18
17
19
18
< body >
20
- < div class ="font-mono "> start time: < label id ="outputDiv "> </ label > </ div >
21
- < div id ="outputDiv2 " class ="font-mono "> </ div >
22
- < div id ="outputDiv3 " class ="font-mono "> </ div >
19
+ < p > This example demonstrates various features:
20
+ < ul class ="list-disc ">
21
+ < li >
22
+ < i > Start time</ i > is computed as soon as the page is loaded,
23
+ and it's placed into an HTML tag by using < tt > <py-script output="outputDiv"></ tt > .
24
+ </ li >
25
+
26
+ < li >
27
+ < i > Current time</ i > is computed every second,
28
+ using < tt > asyncio</ tt > . The HTML tag is modified by using
29
+ the < tt > Element</ tt > class.
30
+ </ li >
31
+ </ ul >
32
+ </ p >
33
+
34
+ < table >
35
+ < tr >
36
+ < th > Start time</ th >
37
+ < td id ="outputDiv "> </ td >
38
+ </ tr >
39
+ < tr >
40
+ < th > Current time</ th >
41
+ < td id ="outputDiv2 "> </ td >
42
+ </ tr >
43
+ < tr >
44
+ < th > </ th >
45
+ < td id ="outputDiv3 "> </ td >
46
+ </ tr >
47
+ </ table >
48
+
23
49
< py-script output ="outputDiv ">
24
50
import utils
25
51
utils.now()
You can’t perform that action at this time.
0 commit comments