]> git.proxmox.com Git - mirror_xterm.js.git/commitdiff
Started new example page
authorparis <pariskasidiaris@gmail.com>
Mon, 24 Mar 2014 16:29:06 +0000 (16:29 +0000)
committerparis <pariskasidiaris@gmail.com>
Mon, 24 Mar 2014 16:29:06 +0000 (16:29 +0000)
demo/index.html
demo/main.js [new file with mode: 0644]
demo/style.css [new file with mode: 0644]

index cc08d151cd6958464a5eb3e61a573e19bbf78ead..369b96263a079df352909873fd56085aca4a0325 100644 (file)
@@ -1,5 +1,15 @@
 <!doctype html>
 <html>
-    <title>xterm.js demo</title>
-    <script src="../src/xterm.js"></script>
+    <head>
+        <title>xterm.js demo</title>
+        <link rel="stylesheet" href="style.css" />
+        <script src="../src/xterm.js"></script>
+        <script src="main.js" defer></script>
+    </head>
+    <body>
+        <h1>
+            xterm.js: xterm, in the browser
+        </h1>
+        <div id="terminal-container"></div>
+    </body>
 </html>
\ No newline at end of file
diff --git a/demo/main.js b/demo/main.js
new file mode 100644 (file)
index 0000000..a57c680
--- /dev/null
@@ -0,0 +1,8 @@
+var terminalContainer = document.getElementById('terminal-container'),
+    term = new Terminal({geometry: [60, 37]});
+
+term.open(terminalContainer);
+
+term.on('data', function (data) {
+    term.write(data);
+});
\ No newline at end of file
diff --git a/demo/style.css b/demo/style.css
new file mode 100644 (file)
index 0000000..ff12385
--- /dev/null
@@ -0,0 +1,17 @@
+body {
+    font-family: helvetica, sans-serif, arial;
+    font-size: 1em;
+    color: #111;
+}
+
+h1 {
+    text-align: center;
+}
+
+#terminal-container {
+    background-color: #111;
+    color: #fafafa;
+    width: 960px;
+    height: 600px;
+    margin: 0 auto;
+}
\ No newline at end of file