Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c29144d

Browse files
committed
improve some of the demos font and removes repr for when objects are outputted to a div
1 parent af107e8 commit c29144d

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

pyscriptjs/examples/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<link rel="stylesheet" href="build/pyscript.css" />
1111
</head>
1212

13-
<body class="container">
13+
<body class="container font-mono">
1414

1515
<h1 class="text-3xl font-bold">PyScript demos</h1>
1616
<hr/>

pyscriptjs/examples/simple_script.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</head>
1414

1515
<body>
16-
<div id="outputDiv" style="background-color:yellow"></div>
16+
<div id="outputDiv" class="font-mono" style="background-color:yellow"></div>
1717
<py-script target="outputDiv">
1818
from datetime import datetime
1919
now = datetime.now()

pyscriptjs/examples/simple_script2.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
<title>Svelte app</title>
88

99
<link rel="icon" type="image/png" href="favicon.png" />
10-
<link rel="stylesheet" href="../build/bundle.css" />
10+
<link rel="stylesheet" href="../build/pyscript.css" />
1111

1212
<script defer src="../build/pyscript.js"></script>
1313
</head>
1414

1515
<body>
16-
<div id="outputDiv"></div>
17-
<div id="outputDiv2" style="background-color: blueviolet"></div>
18-
<div id="outputDiv3" style="background-color: yellow"></div>
16+
<div class="font-mono">start time: <label id="outputDiv"></label></div>
17+
<div id="outputDiv2" class="font-mono"></div>
18+
<div id="outputDiv3" class="font-mono"></div>
1919
<py-script target="outputDiv">
2020
from datetime import datetime
2121
now = datetime.now()

pyscriptjs/src/interpreter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class PyScript:
3535
console.log(f"DATA/IMAGE: {value}")
3636
document.getElementById(element_id).innerHTML = f'<div><img id="plt" src="{value}"/></div>'
3737
else:
38-
document.getElementById(element_id).innerHTML = repr(value);
38+
document.getElementById(element_id).innerHTML = value;
3939
console.log(f"ELSE: {append} ==> {element_id} --> {value}")
4040
4141
@staticmethod

0 commit comments

Comments
 (0)