witty/assets/index.html

59 lines
2.8 KiB
HTML
Raw Normal View History

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>
<script src="main.js"></script>
<link rel="stylesheet" href="xterm.css" />
<link rel="stylesheet" href="main.css" />
<title>Websocket Terminal</title>
</head>
<body>
<h2>Terminal.js Demo</h2>
<div id="terminal">
<div id="terminal_view"></div>
</div>
<script>
term = createTerminal();
// print something to test output and scroll
var str = [
' Xterm.js is the frontend component that powers many terminals including',
' \x1b[3mVS Code\x1b[0m, \x1b[3mHyper\x1b[0m and \x1b[3mTheia\x1b[0m!',
'',
' ┌ \x1b[1mFeatures\x1b[0m ──────────────────────────────────────────────────────────────────┐',
' │ │',
' │ \x1b[31;1mApps just work \x1b[32mPerformance\x1b[0m │',
' │ Xterm.js works with most terminal Xterm.js is fast and includes an │',
' │ apps like bash, vim and tmux optional \x1b[3mWebGL renderer\x1b[0m │',
' │ │',
' │ \x1b[33;1mAccessible \x1b[34mSelf-contained\x1b[0m │',
' │ A screen reader mode is available Zero external dependencies │',
' │ │',
' │ \x1b[35;1mUnicode support \x1b[36mAnd much more...\x1b[0m │',
' │ Supports CJK 語 and emoji \u2764\ufe0f \x1b[3mLinks\x1b[0m, \x1b[3mthemes\x1b[0m, \x1b[3maddons\x1b[0m, \x1b[3mtyped API\x1b[0m │',
' │ ^ Try clicking italic text │',
' │ │',
' └────────────────────────────────────────────────────────────────────────────┘',
''
].join('\n\r');
term.writeln(str);
term.writeln(str);
term.writeln(str);
</script>
</body>
</html>