-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
105 lines (89 loc) · 2.62 KB
/
index.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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="./yosys/yosysjs.js"></script>
<script src="./pako.js"></script>
<script src="./ace/ace.js"></script>
<script src="index.js" type="module"></script>
<script src="tabs.js" type="module"></script>
<style>
body {
margin: 0;
height: 100vh;
overflow: hidden;
display: flex;
flex-direction: column;
}
header {
display: flex;
}
header>div {
padding: 10px;
cursor: pointer;
background-color: gray;
}
header>div:hover {
background-color: lightgray;
}
header>div[active] {
background-color: gray;
}
main {
flex-basis: 0; /* weird but works */
flex-grow: 1;
}
main>div {
display: none;
}
main>div[active] {
display: initial;
}
textarea {
width: 100%;
height: 200px;
}
#input {
height: 200px;
}
#input {
flex-grow: 1;
}
#codeTab[active] {
height: 100%;
display: flex;
flex-direction: column;
}
#output {
overflow-wrap: anywhere;
}
svg {
width: 100%;
height: 100%;
}
</style>
</head>
<body class="ace-monokai">
<header>
<div id="codeButton">Code</div>
<div id="graphButton">Graph</div>
<div id="blueprintButton">Blueprint</div>
<section style="flex-grow: 1;"></section>
<div id="compile">Compile</div>
</header>
<main>
<div id="codeTab" active>
<div id="input"></div>
</div>
<div id="graphTab">
<svg id="svg"></svg>
</div>
<div id="blueprintTab">
<div id="output"></div>
</div>
</main>
</body>
</html>