witty/assets/term.html

57 lines
2.0 KiB
HTML
Raw Normal View History

2022-01-11 16:08:32 +01:00
<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
<script src="/assets/external/xterm.js"></script>
<script src="/assets/external/xterm-addon-attach.js"></script>
<script src="/assets/external/xterm-addon-fit.js"></script>
<script src="/assets/external/xterm-addon-web-links.js"></script>
<script src="/assets/main.js"></script>
<link rel="stylesheet" href="/assets/external/xterm.css" />
2022-01-13 23:58:41 +01:00
<link href="/assets/external/bootstrap.min.css" rel="stylesheet">
2022-01-11 16:08:32 +01:00
<link rel="stylesheet" href="/assets/main.css" />
2022-01-13 23:58:41 +01:00
<title>{{.title}}</title>
2022-01-11 16:08:32 +01:00
</head>
<body>
2022-01-13 23:58:41 +01:00
<header>
<nav class="navbar navbar-dark bg-dark shadow-sm navbar-xs">
<div class="container-fluid">
<a class="navbar-brand mx-auto" href="https://github.com/syssecfsu/witty" target="_blank">
<img src="/assets/logo.svg" style="margin-right: 0.5rem;" height="28"
class="d-inline-block align-text-top">
{{.title}}
</a>
<!-- <a class="btn btn-primary btn-sm float-end" href="/new" role="button">New Session</a> -->
</div>
</nav>
</header>
2022-01-11 21:22:24 +01:00
2022-01-12 13:33:06 +01:00
<div style="margin-top: 5em;">
2022-01-11 21:22:24 +01:00
<div id="terminal">
<div id="terminal_view"></div>
</div>
</div>
2022-01-11 16:08:32 +01:00
<script>
term = createTerminal("{{.path}}");
// print something to test output and scroll
var str = [
2022-01-12 12:54:49 +01:00
' ┌────────────────────────────────────────────────────────────────────────────┐\n',
2022-01-12 13:33:06 +01:00
' │ Powered by \u001b[32;1mGo, Gin, websocket, pty, and xterm.js\x1b[0m │\n',
2022-01-12 12:54:49 +01:00
' └────────────────────────────────────────────────────────────────────────────┘\n',
2022-01-11 16:08:32 +01:00
''
2022-01-12 12:54:49 +01:00
].join('');
2022-01-11 16:08:32 +01:00
term.writeln(str);
</script>
2022-01-11 21:22:24 +01:00
2022-01-11 16:08:32 +01:00
</body>
</html>