Newer
Older
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>RPN calculator</title>
<style type="text/css">
#container {
display: flex;
flex-flow: row;
width: 700px;
margin: 10px auto;
border: 1px grey dotted;
}
#container > div {
border: 1px grey dotted;
}
#container > div > p {
margin-left: 10px;
}
#stack {
width: 200px;
height: 500px
}
#keyboard {
width: 300px;
height: 500px
}
#trail {
width: 200px;
height: 500px
}
#stack-content {
margin-left: 10px;
}
#trail-content {
margin-left: 10px;
}
.keyboard {
font-size: 1.2em;
text-align: center;
}
.keyboard table {
margin: 2px auto;
}
.keyboard td {
width: 60px;
height: 60px;
}
#number-display {
border: 1px grey solid;
width: 100%;
text-align: right;
}
</style>
</head>
<body>
<div id="container">
<div id="stack">
<p>Stack</p>
<div id="stack-content"></div>
</div>
<div id="keyboard">
<p>Keyboard</p>
<div class="keyboard">
<table>
<tr>
<td colspan="4" id="number-display">789</td>
</tr>
<tr>
<td>7</td><td>8</td><td>9</td><td><</td>
</tr>
<tr>
<td>4</td><td>5</td><td>6</td><td>*</td>
</tr>
<tr>
<td>1</td><td>2</td><td>3</td><td>-</td>
</tr>
<tr>
<td>0</td><td>/</td><td>.</td><td>+</td>
</tr>
<tr>
<td>SWP</td><td>UNDO</td><td></td><td>RET</td>
</tr>
</table>
</div>
</div>
<div id="trail">
<p>Trail</p>
<div id="trail-content"></div>
</div>
</div>
<script type="text/javascript" src="vendor/jquery.min.js"></script>
<script type="text/javascript">
$("#stack-content").append($('<pre>').text('3: 1'));
$("#stack-content").append($('<pre>').text('2: 2'));
$("#stack-content").append($('<pre>').text('1: 3'));
$("#stack-content").append($('<pre>').text(' .'));
$("#trail-content").append($('<pre>').text(' 1'));
$("#trail-content").append($('<pre>').text(' 2'));
$("#trail-content").append($('<pre>').text('> 3'));
</script>
</body>
</html>