-
Notifications
You must be signed in to change notification settings - Fork 44
/
index.html
83 lines (80 loc) · 4.72 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<!DOCTYPE html>
<html>
<head>
<title>AngularJS Terminal Emulator | vtortola.GitHub.io</title>
<link rel="shortcut icon" href="favicon.ico">
<meta name="description" content="Javascript terminal emulator in AngularJS" />
<meta name="viewport" content="width=device-width">
<meta property="og:image" content="http://vtortola.github.io/ng-terminal-emulator/example/content/angular.png">
<script>
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date(); a = s.createElement(o),
m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m)
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
ga('create', 'UA-53263543-1', 'auto');
ga('send', 'pageview');
</script>
<link href="src/vtortola.ng-terminal.css" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css?family=Architects+Daughter" rel="stylesheet" type="text/css">
<link href="example/content/example.css" rel="stylesheet" />
</head>
<body ng-app="ng-terminal-example">
<section class="console-section">
<section class="container">
<section class="head">
<h1>ng-terminal-emulator</h1>
<h4>A terminal emulator in Javascript with AngularJS </h4>
<a href="https://github.com/vtortola/ng-terminal-emulator" class="gitHub" ng-click="gitHub()">
<small>View project on</small>
GitHub
</a>
</section>
<div class="console-options">
<label><input type="radio" ng-model="theme" name="theme" value="vintage">Vintage</label>
<label><input type="radio" ng-model="theme" name="theme" value="modern">Modern</label>
</div>
<div ng-controller="console" ng-show="theme == 'vintage'">
<terminal terminal-class="vintage-terminal" terminal-config="vintage">
<p class="click-me">Click me to start commanding !</p>
</terminal>
</div>
<div ng-controller="console" ng-show="theme == 'modern'">
<terminal>
<p class="click-me">Click me to start commanding !</p>
</terminal>
</div>
<a class="unit-tests" href="tests" ng-click="unitTests()">Unit tests</a>
</section>
</section>
<section class="instructions-section">
<section class="container">
<section class="instructions">
<h3>Instructions</h3>
<p>This is an example of ng-terminal-emulator used to recreate a small command line interpreter.</p>
<p>
This example uses browser's <b>localStorage</b> as file system. It is possible to create files
using standard output redirection:
</p>
<pre>:>echo single line > file.txt</pre>
<pre>:>break multiple line > file.txt</pre>
<p>Or append to files:</p>
<pre>:>echo single line >> file.txt</pre>
<pre>:>break multiple line >> file.txt</pre>
<p>The following file system commands are available: <b>ls</b>, <b>cat</b>, <b>rm</b>, <b>mkdir</b>, <b>cd</b>, <b>pwd</b> and <b>rmdir</b>.</p>
<p>Cross path operations are not supported in this example.</p>
<h3>Looking for a more complex example?</h3>
<p>Take a look to the <a href="//github.com/vtortola/WebSocketListener/wiki/WebSocketListener-Terminal-Server">Terminal Server example</a> that uses <a href="http://vtortola.github.io/WebSocketListener/">WebSocketListener.</a></p>
<img id="terminal-server-preview" src="http://vtortola.github.io/ng-terminal-emulator/example/content/terminalservercapture.png" />
</section>
</section>
</section>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.21/angular.js"></script>
<script src="src/vtortola.ng-terminal.js"></script>
<script src="example/example.command.tools.js"></script>
<script src="example/example.js"></script>
<script src="example/example.command.implementations.js"></script>
<script src="example/example.command.filesystem.js"></script>
</body>
</html>