-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
121 lines (116 loc) · 3.49 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Logic gates node editor</title>
<link rel="stylesheet" href="./css/dropdown.css" />
<link rel="stylesheet" href="./css/searchBox.css" />
<link rel="stylesheet" href="./css/nav.css" />
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Bitstream Vera", sans-serif;
user-select: none;
}
html {
overflow-x: hidden;
}
body {
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
</style>
</head>
<body>
<ul id="searchBox">
<li>
<input type="text" id="SearchText" placeholder="Search..." />
</li>
<li>
<ul id="SearchBoxDropdown">
<li>
<a onclick="singleInputNode()">Single Input Node</a>
</li>
<li>
<a onclick="singleOutputNode()">Single Output Node</a>
</li>
<li><a onclick="addAndNode()">And Node</a></li>
<li><a onclick="addNotNode()">Not node</a></li>
<li><a onclick="addOrNode()">Or node</a></li>
<li><a onclick="addXorNode()">Xor node</a></li>
<li><a onclick="addXandNode()">Xand node</a></li>
<li><a onclick="addNandNode()">Nand node</a></li>
<li><a onclick="addNorNode()">Nor Node</a></li>
</ul>
</li>
<li><span id="scroller">\/</span></li>
</ul>
<ul id="dropdown">
<li><span id="Name">Add</span></li>
<li id="search"><a onclick="showSearchBox()">Search...</a></li>
<li>
<a>Input & OutPut</a>
<ul id="dropdown">
<li>
<a onclick="singleInputNode()">Single Input Node</a>
</li>
<li>
<a onclick="singleOutputNode()">Single Output Node</a>
</li>
</ul>
</li>
<li>
<a href="#">Basic Nodes</a>
<ul id="dropdown">
<li><a onclick="addAndNode()">And Node</a></li>
<li><a onclick="addNotNode()">Not node</a></li>
<li><a onclick="addOrNode()">Or node</a></li>
<li><a onclick="addXorNode()">Xor node</a></li>
<li><a onclick="addXandNode()">Xand node</a></li>
<li><a onclick="addNandNode()">Nand node</a></li>
<li><a onclick="addNorNode()">Nor Node</a></li>
</ul>
</li>
<li>
<a>Group</a>
<ul id="dropdown">
<li><span>Coming soon...</span></li>
</ul>
</li>
</ul>
<ul id="nav">
<li><a onclick="showFileDropdown()">File</a></li>
<li><a>Edit</a></li>
</ul>
<ul id="fileDropdown">
<li><a onclick="newFile()">New</a></li>
<li><a>Open</a></li>
<li><a>Save</a></li>
<li><a>Exit</a></li>
</ul>
<canvas id="graph"></canvas>
<input
type="range"
id="scale"
max="2.4"
min="1"
step="0.1"
style="position: absolute; display: none"
/>
</body>
<script defer>
alert(
"Quick instructions to use:\nshift + A - add nodes\nx - delete nodes\ng - move nodes"
);
</script>
<script defer src="./scripts/logicGatesClasses.js"></script>
<script defer src="./scripts/logicGatesSetup.js"></script>
<script defer src="./scripts/UiFunctions.js"></script>
<script defer src="./scripts/logicGatesEventListeners.js"></script>
</html>