2022-01-04 21:41:41 +01:00
|
|
|
<!doctype html>
|
|
|
|
<html>
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8" />
|
|
|
|
|
|
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
|
|
<link href="https://fonts.googleapis.com/css2?family=Fira+Code&family=Fira+Sans&display=swap" rel="stylesheet">
|
|
|
|
|
|
|
|
<script src="xterm.js"></script>
|
|
|
|
<script src="xterm-addon-attach.js"></script>
|
|
|
|
<script src="xterm-addon-fit.js"></script>
|
|
|
|
<script src="xterm-addon-web-links.js"></script>
|
|
|
|
|
2022-01-05 03:21:21 +01:00
|
|
|
<script src="main.js"></script>
|
2022-01-04 21:41:41 +01:00
|
|
|
|
|
|
|
<link rel="stylesheet" href="xterm.css" />
|
|
|
|
<link rel="stylesheet" href="main.css" />
|
2022-01-05 03:21:21 +01:00
|
|
|
|
2022-01-04 21:41:41 +01:00
|
|
|
<title>Websocket Terminal</title>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
2022-01-07 15:00:44 +01:00
|
|
|
<h2>Web Terminal</h2>
|
2022-01-04 21:41:41 +01:00
|
|
|
<div id="terminal">
|
|
|
|
<div id="terminal_view"></div>
|
|
|
|
</div>
|
|
|
|
<script>
|
|
|
|
term = createTerminal();
|
|
|
|
// print something to test output and scroll
|
2022-01-05 03:21:21 +01:00
|
|
|
var str = [
|
2022-01-07 15:00:44 +01:00
|
|
|
' ┌────────────────────────────────────────────────────────────────────────────┐',
|
2022-01-07 18:19:59 +01:00
|
|
|
' │ \x1b[32mXterm.js\x1b[0m is the frontend component that powers many terminals including, │',
|
2022-01-07 15:00:44 +01:00
|
|
|
' │ \x1b[3mVS Code\x1b[0m, \x1b[3mHyper\x1b[0m and \x1b[3mTheia\x1b[0m! │',
|
2022-01-05 03:21:21 +01:00
|
|
|
' │ │',
|
2022-01-07 15:00:44 +01:00
|
|
|
' │ \x1b[34mhttps://xtermjs.org\x1b[0m (<-try to click it!) │',
|
2022-01-05 03:21:21 +01:00
|
|
|
' └────────────────────────────────────────────────────────────────────────────┘',
|
|
|
|
''
|
|
|
|
].join('\n\r');
|
|
|
|
|
|
|
|
term.writeln(str);
|
2022-01-04 21:41:41 +01:00
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
|
|
|
|
</html>
|