Spaces:
Sleeping
Sleeping
Update templates/index.html
Browse files- templates/index.html +35 -15
templates/index.html
CHANGED
@@ -2,31 +2,51 @@
|
|
2 |
<html lang="en">
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
-
<
|
6 |
-
<title>Bash Shell</title>
|
7 |
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.0.0/socket.io.js"></script>
|
8 |
<style>
|
9 |
-
body {
|
10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
</style>
|
12 |
</head>
|
13 |
<body>
|
|
|
14 |
<div id="output"></div>
|
15 |
-
<input id="input"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
<script>
|
17 |
-
|
18 |
|
19 |
socket.on('output', function(data) {
|
20 |
-
document.getElementById('output').
|
21 |
});
|
22 |
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
}
|
29 |
-
});
|
30 |
</script>
|
31 |
</body>
|
32 |
</html>
|
|
|
2 |
<html lang="en">
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
+
<title>Shell and File Manager</title>
|
|
|
|
|
6 |
<style>
|
7 |
+
body {
|
8 |
+
font-family: Arial, sans-serif;
|
9 |
+
}
|
10 |
+
h1 {
|
11 |
+
color: #333;
|
12 |
+
}
|
13 |
+
#output {
|
14 |
+
border: 1px solid #ccc;
|
15 |
+
padding: 10px;
|
16 |
+
height: 200px;
|
17 |
+
overflow-y: scroll;
|
18 |
+
background-color: #f9f9f9;
|
19 |
+
}
|
20 |
</style>
|
21 |
</head>
|
22 |
<body>
|
23 |
+
<h1>Shell</h1>
|
24 |
<div id="output"></div>
|
25 |
+
<input id="input" type="text" />
|
26 |
+
<button onclick="sendInput()">Send</button>
|
27 |
+
|
28 |
+
<h1>File Upload</h1>
|
29 |
+
<form action="/upload" method="post" enctype="multipart/form-data">
|
30 |
+
<input type="file" name="file" />
|
31 |
+
<input type="submit" value="Upload" />
|
32 |
+
</form>
|
33 |
+
|
34 |
+
<h1>File Manager</h1>
|
35 |
+
<p><a href="/files">Go to File Manager</a></p>
|
36 |
+
|
37 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.0.0/socket.io.js"></script>
|
38 |
<script>
|
39 |
+
var socket = io();
|
40 |
|
41 |
socket.on('output', function(data) {
|
42 |
+
document.getElementById('output').innerHTML += data;
|
43 |
});
|
44 |
|
45 |
+
function sendInput() {
|
46 |
+
var input = document.getElementById('input').value;
|
47 |
+
socket.emit('input', input);
|
48 |
+
document.getElementById('input').value = '';
|
49 |
+
}
|
|
|
|
|
50 |
</script>
|
51 |
</body>
|
52 |
</html>
|