Skip to content

Commit 90a8fa6

Browse files
css, messages fix
1 parent b481547 commit 90a8fa6

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

index.html

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,16 @@
2020
}
2121

2222
textarea {
23-
min-height: 10ch;
23+
min-height: 10em;
24+
resize: vertical;
2425
}
2526

2627
#errors {
2728
color: red;
2829
}
2930

3031
@media screen and (prefers-color-scheme: dark) {
31-
body {
32+
body, textarea {
3233
color: white;
3334
background: black;
3435
}
@@ -47,8 +48,11 @@ <h1>Schemascii Playground</h1>
4748
<p>CSS</p><textarea id="css"></textarea>
4849
</div>
4950
</div>
51+
<h2>Result</h2>
5052
<div id="output"></div>
53+
<h2>Messages</h2>
5154
<pre id="console"></pre>
55+
<h2>Errors</h2>
5256
<pre id="errors"></pre>
5357
</body>
5458
<script>
@@ -66,7 +70,7 @@ <h1>Schemascii Playground</h1>
6670
info("Loading Python... ");
6771
pyodide = await loadPyodide({ stdout: info, stderr: error });
6872
info("done\nInstalling micropip...");
69-
await pyodide.loadPackage("micropip", { errorCallback: error, messageCallback: info });
73+
await pyodide.loadPackage("micropip", { errorCallback: error, messageCallback: () => {} });
7074
info("done\nFetching current Schemascii version... ");
7175
var pyproject_toml = await fetch("pyproject.toml").then(x => x.text());
7276
var ver = /version = "([\d.]+)"/.exec(pyproject_toml)[1];
@@ -77,7 +81,7 @@ <h1>Schemascii Playground</h1>
7781
await setup();
7882
console.textContent = "ready\n";
7983
} catch (e) {
80-
error(`\nJS Error:\n${e.stack}\n`);
84+
error(`\n${e.stack}\n`);
8185
throw e;
8286
}
8387
}
@@ -102,7 +106,7 @@ <h1>Schemascii Playground</h1>
102106
try {
103107
output.innerHTML = await schemascii.render("playground", source.value);
104108
} catch (e) {
105-
error(`\nJS Error:\n${e.stack}\n`);
109+
error(`\n${e.stack}\n`);
106110
output.innerHTML = "";
107111
throw e;
108112
}
@@ -112,4 +116,4 @@ <h1>Schemascii Playground</h1>
112116
main();
113117
</script>
114118

115-
</html>
119+
</html>

0 commit comments

Comments
 (0)