-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.html
45 lines (43 loc) · 1.24 KB
/
demo.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
<!DOCTYPE html>
<html>
<head>
<title>WP Term</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="theme-integrations/common/wpterm.js"></script>
<script type="text/javascript">
window.addEventListener('load', function() {
wpTerm = wpTerm($('.terminal'));
$('.term-input').on('keyup', wpTerm.handleKeyUp);
}, false);
</script>
<style type="text/css">
body {
height: 500px;
}
.terminal {
font-family: "Courier New", Courier, monospace;
height:100%;
}
.term-history {
height:calc(100% - 40px); /* subtract input height */
overflow-y:auto;
}
.term-input {
border: 0;
width: calc(100% - 85px); /* subtract prompt width */
overflow-x: hidden;
font-family: inherit;
font-size: inherit;
}
</style>
</head>
<body>
<div class="terminal">
<div class="term-history"></div>
<div class="term-cmd-line">
<span class="term-prompt">prompt></span>
<input class="term-input" value="" />
</div>
</div>
</body>
</html>