Skip to content

Commit d0ae4d9

Browse files
committed
side-by-side layout
1 parent b7ae12f commit d0ae4d9

File tree

1 file changed

+62
-35
lines changed

1 file changed

+62
-35
lines changed

playground/index.html

Lines changed: 62 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,69 @@
11
<!doctype html>
22
<html lang="en">
3-
<head>
4-
<meta charset="UTF-8" />
5-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<title>Playground</title>
7-
<link rel="icon" type="image/png" href="./favicon.png">
8-
<!--script src="https://unpkg.com/[email protected]"></script-->
9-
<script src="https://www.typescriptlang.org/js/vs.loader.js"></script>
10-
<script src="./index.js" defer></script>
11-
<style>
12-
body {
13-
overflow: hidden;
14-
margin: 0;
15-
height: 100vh;
3+
4+
<head>
5+
<meta charset="UTF-8" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Playground</title>
8+
<link rel="icon" type="image/png" href="./favicon.png">
9+
<!--script src="https://unpkg.com/[email protected]"></script-->
10+
<script src="https://www.typescriptlang.org/js/vs.loader.js"></script>
11+
<script src="./index.js" defer></script>
12+
<style>
13+
body {
14+
overflow: hidden;
15+
margin: 0;
16+
}
17+
18+
#main {
19+
font-size: 12pt;
20+
width: 94%;
21+
padding: 0pt;
22+
margin: 1% 3% 5ex 3%;
23+
}
24+
25+
#leftPane {
26+
float: left;
27+
height: 90vh;
28+
width: 58%;
29+
margin: 0;
30+
background-color: rgb(255, 221, 227);
31+
32+
&>#monaco-editor {
33+
height: 100%;
1634
}
17-
#monaco-editor {
18-
height: 50vh;
19-
background-color: rgb(255, 221, 227);
35+
}
36+
37+
#rightPane {
38+
float: right;
39+
height: 90vh;
40+
width: 40%;
41+
margin: 0;
42+
background-color: #eceff3;
43+
/* border: 1px solid #ccc;
44+
border-bottom: 0;
45+
padding: 10px; */
46+
display: flex;
47+
flex-direction: column;
48+
49+
&>pre {
50+
overflow: scroll;
51+
flex-grow: 1;
2052
}
21-
#lower-pane {
22-
background-color: #e3f1ff;
23-
border: 1px solid #ccc;
24-
border-bottom: 0;
25-
padding: 10px;
26-
margin: 0;
27-
height: 50vh;
28-
& > pre {
29-
overflow: scroll;
30-
height: 85%;
31-
}
32-
}
33-
</style>
34-
</head>
35-
<body>
36-
<div id="monaco-editor"></div>
37-
<div id="lower-pane">
38-
<button id="run-code">Run Code</button>
53+
}
54+
</style>
55+
</head>
56+
57+
<body>
58+
<div id="main">
59+
<div id="leftPane">
60+
<div id="monaco-editor"></div>
61+
</div>
62+
<div id="rightPane">
63+
<div><button id="run-code">Run Code</button></div>
3964
<pre id="console-output"></pre>
4065
</div>
41-
</body>
66+
</div>
67+
</body>
68+
4269
</html>

0 commit comments

Comments
 (0)