20
20
}
21
21
22
22
textarea {
23
- min-height : 10ch ;
23
+ min-height : 10em ;
24
+ resize : vertical;
24
25
}
25
26
26
27
# errors {
27
28
color : red;
28
29
}
29
30
30
31
@media screen and (prefers-color-scheme : dark) {
31
- body {
32
+ body , textarea {
32
33
color : white;
33
34
background : black;
34
35
}
@@ -47,8 +48,11 @@ <h1>Schemascii Playground</h1>
47
48
< p > CSS</ p > < textarea id ="css "> </ textarea >
48
49
</ div >
49
50
</ div >
51
+ < h2 > Result</ h2 >
50
52
< div id ="output "> </ div >
53
+ < h2 > Messages</ h2 >
51
54
< pre id ="console "> </ pre >
55
+ < h2 > Errors</ h2 >
52
56
< pre id ="errors "> </ pre >
53
57
</ body >
54
58
< script >
@@ -66,7 +70,7 @@ <h1>Schemascii Playground</h1>
66
70
info ( "Loading Python... " ) ;
67
71
pyodide = await loadPyodide ( { stdout : info , stderr : error } ) ;
68
72
info ( "done\nInstalling micropip..." ) ;
69
- await pyodide . loadPackage ( "micropip" , { errorCallback : error , messageCallback : info } ) ;
73
+ await pyodide . loadPackage ( "micropip" , { errorCallback : error , messageCallback : ( ) => { } } ) ;
70
74
info ( "done\nFetching current Schemascii version... " ) ;
71
75
var pyproject_toml = await fetch ( "pyproject.toml" ) . then ( x => x . text ( ) ) ;
72
76
var ver = / v e r s i o n = " ( [ \d . ] + ) " / . exec ( pyproject_toml ) [ 1 ] ;
@@ -77,7 +81,7 @@ <h1>Schemascii Playground</h1>
77
81
await setup ( ) ;
78
82
console . textContent = "ready\n" ;
79
83
} catch ( e ) {
80
- error ( `\nJS Error:\ n${ e . stack } \n` ) ;
84
+ error ( `\n${ e . stack } \n` ) ;
81
85
throw e ;
82
86
}
83
87
}
@@ -102,7 +106,7 @@ <h1>Schemascii Playground</h1>
102
106
try {
103
107
output . innerHTML = await schemascii . render ( "playground" , source . value ) ;
104
108
} catch ( e ) {
105
- error ( `\nJS Error:\ n${ e . stack } \n` ) ;
109
+ error ( `\n${ e . stack } \n` ) ;
106
110
output . innerHTML = "" ;
107
111
throw e ;
108
112
}
@@ -112,4 +116,4 @@ <h1>Schemascii Playground</h1>
112
116
main ( ) ;
113
117
</ script >
114
118
115
- </ html >
119
+ </ html >
0 commit comments