Skip to content

Commit 4a891c5

Browse files
save file
1 parent 7ce06f1 commit 4a891c5

File tree

1 file changed

+55
-55
lines changed

1 file changed

+55
-55
lines changed

utils/misc/terminal/terminal.html

Lines changed: 55 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
<head>
1515
<meta charset=utf-8>
16-
16+
1717
<title>
1818
Node.js Terminal
1919
</title>
@@ -25,7 +25,7 @@
2525

2626
<link rel='shortcut icon' type='image/x-icon' href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAcCAMAAABBJv+bAAAAQlBMVEVHcEwyODg0ODkzNzgxNzc0ODk0ODkzODgzODgzNzgyNzgzODg0ODkzODgyNzgzODgzODgzODk0ODk0ODkyNzg0ODmObyvDAAAAFXRSTlMABvaSDbPHe15GL5u9hRxvO6rn2VJXM6DpAAAAxElEQVQoz71TyRbDIAh0Ie6J2fz/Xy3Y2pDktZ5aTiODCAMK0QxAPoFsgNk0JrMEQmEwyU5ndt4K2khQEzLhdNeQTznCWREegNEOOe18fRO8i6ooz+gRw1k9gMkyo/E9zY5yKMX+ihbLq8mjFB5N4UepYLGRmdM7OnLlpYtJXWQQkFCIpHcpfBVpCxeRV/KuodHzmfaNxuTmlpxmoEzc5bs0rnGdQQZeybWxRX6Vxf5rJJ116CxTZxX5Isf7Ive+wadP9AAuFg97y3bd7gAAAABJRU5ErkJggg=='>
2727
<meta name=viewport content='width=device-width, initial-scale=1'>
28-
28+
2929
<script type='application/ld+json'>
3030
{
3131
"@context" : "https://schema.org",
@@ -40,11 +40,11 @@
4040
"softwareVersion" : "1.0.0",
4141
"offers" : {"@type":"Offer","price":"0","priceCurrency":"GBP"}
4242
}
43-
</script>
44-
45-
46-
<script src='https://libs.ext-code.com/js/dom/component/component.js'></script>
47-
43+
</script>
44+
45+
46+
<script src='https://libs.ext-code.com/js/dom/component/v3.0/component.js'></script>
47+
4848
<script init>
4949
console.clear();
5050
console.log('terminal-v2.0.html');
@@ -63,28 +63,28 @@
6363
var menu;
6464

6565
var hdr;
66-
67-
66+
67+
6868
async function init(){
69-
70-
69+
70+
7171
menu = menumod();
72-
72+
7373
mod.base.add({ext,$,datatype,keydown,menu,menumod});
7474

7575

7676
hdr = mod['misc-hdr'];
7777

7878
hdr.initmod({ext,$});
79-
79+
8080

8181
await Promise.all([
8282
hdr.init(),
8383
]);
8484

8585

8686
initdom();
87-
87+
8888

8989
}//init
9090

@@ -94,7 +94,7 @@
9494
mod.stack.add;
9595

9696
({ext} = await import('https://libs.ext-code.com/js/io/ext-loader/ext-loader.m.js'));
97-
97+
9898
var promise = ext.load.libs(
9999
'js/dom/$.js',
100100
'js/core/datatype.js',
@@ -103,21 +103,21 @@
103103
'js/debug/debug.js',
104104
);
105105
[$,datatype,menumod,keydown,debug] = await promise;
106-
106+
107107
mod.stack.complete;
108-
108+
109109
})();
110110

111111

112112
</script>
113-
114-
113+
114+
115115

116116

117117
<link rel=stylesheet href='https://cdn.jsdelivr.net/npm/@xterm/xterm@5.5.0/css/xterm.css'>
118118

119119
<style>
120-
120+
121121
html
122122
{height:100%;font-family:arial}
123123
body
@@ -129,35 +129,35 @@
129129
{padding:10px;border:2px solid lightgray;box-sizing:border-box}
130130

131131
</style>
132-
132+
133133
</head>
134134

135135

136136
<body>
137-
138-
137+
138+
139139
<misc-hdr component=grp>
140140
<img class=title src='images/terminal.png' style='top:-15px;height:50px' alt='Node.js Terminal'>
141141
<time slot=date datetime=2025-10-31>31 Oct 2025</time>
142142
</misc-hdr>
143-
144-
143+
144+
145145
<div id=terminal></div>
146-
147-
146+
147+
148148
</body>
149-
150-
149+
150+
151151
<script>
152-
152+
153153

154154
function initdom(){
155-
155+
156156
}//initdom
157-
158-
159-
160-
157+
158+
159+
160+
161161
var theme = {};
162162

163163
theme.light = {
@@ -182,12 +182,12 @@
182182
brightCyan : '#00938d',
183183
brightWhite : '#ffffff'
184184
};
185-
186-
185+
186+
187187
var x = {
188-
188+
189189
reset : '\x1b[0m',
190-
190+
191191
black : '\x1b[30m',
192192
red : '\x1b[31m',
193193
green : '\x1b[32m',
@@ -196,7 +196,7 @@
196196
magenta : '\x1b[35m',
197197
cyan : '\x1b[36m',
198198
white : '\x1b[37m',
199-
199+
200200
brightBlack : '\x1b[90m',
201201
brightRed: '\x1b[91m',
202202
brightGreen: '\x1b[92m',
@@ -205,35 +205,35 @@
205205
brightMagenta: '\x1b[95m',
206206
brightCyan: '\x1b[96m',
207207
brightWhite: '\x1b[97m',
208-
208+
209209
bgRed: '\x1b[41m',
210210
bgGreen: '\x1b[42m',
211211
bgYellow: '\x1b[43m',
212212
bgBlue: '\x1b[44m',
213213
bgMagenta: '\x1b[45m',
214214
bgCyan: '\x1b[46m',
215215
bgWhite: '\x1b[47m',
216-
216+
217217
bgBrightRed : '\x1b[101m',
218218
bgBrightGreen : '\x1b[102m',
219219
bgBrightYellow : '\x1b[103m',
220220
bgBrightBlue : '\x1b[104m',
221221
bgBrightMagenta : '\x1b[105m',
222222
bgBrightCyan : '\x1b[106m',
223223
bgBrightWhite : '\x1b[107m',
224-
224+
225225
bold : '\x1b[1m',
226226
dim : '\x1b[2m',
227227
italic : '\x1b[3m',
228228
underline : '\x1b[4m',
229229
inverse : '\x1b[7m',
230230
hidden : '\x1b[8m',
231231
strikethrough : '\x1b[9m',
232-
232+
233233
gray : '\x1b[38;5;245m',
234234

235235
};
236-
236+
237237
var chr = {
238238
warn : '\u26A0',
239239
cross : '\u274C',
@@ -245,26 +245,26 @@
245245
ok : '\u1F197',
246246
};
247247

248-
248+
249249
</script>
250250

251251

252252
<script type=module>
253253
console.clear();
254254
import {Terminal} from 'https://cdn.jsdelivr.net/npm/@xterm/xterm/+esm';
255-
import {FitAddon} from 'https://cdn.jsdelivr.net/npm/@xterm/addon-fit/+esm'
255+
import {FitAddon} from 'https://cdn.jsdelivr.net/npm/@xterm/addon-fit/+esm'
256256
import {WebContainer} from 'https://cdn.jsdelivr.net/npm/@webcontainer/api/+esm'
257257

258258
var term = new Terminal({
259-
259+
260260
fontFamily : 'monospace',
261261
fontSize : 16,
262262
lineHeight : 1.0,
263-
264-
263+
264+
265265
theme : theme.light,
266266
rendererType : 'dom',
267-
267+
268268
});
269269
var fitAddon = new FitAddon();
270270
term.loadAddon(fitAddon);
@@ -276,13 +276,13 @@
276276
var shell = await webcontainer.spawn('jsh');
277277
var output = new WritableStream({write(data){term.write(data)}});
278278
shell.output.pipeTo(output);
279-
279+
280280
var input = shell.input.getWriter();
281281
term.onData(data=>input.write(data));
282282

283283
term.focus();
284-
284+
285285
</script>
286-
287-
</html>
288286

287+
</html>
288+

0 commit comments

Comments
 (0)