-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
210 lines (192 loc) · 6.57 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<!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=0.5" />
<link rel="stylesheet" href="style.css" />
<title>Logic Circuit Simulator</title>
</head>
<body>
<div class="top-bar">
<div class="top-section">
<form
id="input-container-top"
onsubmit="changeCompName(); return false;"
>
<div class="input-container" id="input-container-top">
<label for="inp" class="inp" id="inp-comp">
<input
type="text"
id="comp-inp"
placeholder=" "
autocomplete="off"
/>
<span class="label" id="comp-label">Component Name</span>
</label>
<div class="done-container">
<input
type="image"
src="./img/doneIcon.png"
alt=""
width="25"
height="25"
alt="Submit Form"
/>
</div>
</div>
</form>
<div class="top-close" onclick="closeCompShownMode()">
<img src="./img/closeIcon.png" alt="" width="30" height="30" />
</div>
</div>
<a
href="https://github.com/saliherdemk/Logic-Circuit-Simulator"
target="_blank"
>
<img class="github-logo" src="./img/githubLogo.png" alt="" />
</a>
</div>
<div class="disabled-background"></div>
<div class="gates">
<button class="input" onclick="generateInput()"></button>
<button class="output" onclick="generateOutput()"></button>
<button class="andGate" onclick="generateANDGate()"></button>
<button class="orGate" onclick="generateORGate()"></button>
<button class="notGate" onclick="generateNOTGate()"></button>
<button class="nandGate" onclick="generateNANDGate()"></button>
<button class="norGate" onclick="generateNORGate()"></button>
<button class="xorGate" onclick="generateXORGate()"></button>
<button class="xnorGate" onclick="generateXNORGate()"></button>
<button class="delete-btn" onclick="toggleDeleteMode()"></button>
</div>
<div class="custom-gates">
<h5>Integrated Circuits</h5>
</div>
<div class="popup-click">
<span id="error"></span>
<form class="ccg-div" onsubmit="createCustomGate(); return false;">
<div class="input-container">
<label for="inp" class="inp">
<input
type="text"
id="ccg-inp"
placeholder=" "
autocomplete="off"
/>
<div class="label">Gate Name</div>
</label>
<div class="done-container">
<input
type="image"
src="./img/doneIcon.png"
alt=""
width="25"
height="25"
alt="Submit Form"
/>
</div>
</div>
</form>
<button class="ccg-btn" onclick="clone()">Duplicate</button>
<button class="ccg-btn" onclick="deleteSelected()">Delete</button>
<button class="ccg-btn" onclick="closeMenu()">Cancel</button>
</div>
<div class="popup-container">
<div class="popup-input">
<div class="img-container" onclick="closePopup()">
<img src="./img/closeIcon.png" alt="" width="25" height="25" />
</div>
<form class="ccg-div" onsubmit="handlePopupInput(); return false;">
<div class="input-container" id="input-container-popup">
<label for="inp" class="inp">
<input
type="text"
id="inp"
placeholder=" "
autocomplete="off"
/>
<span class="label">Gate Name</span>
</label>
<div class="done-container">
<input
type="image"
src="./img/doneIcon.png"
alt=""
width="25"
height="25"
alt="Submit Form"
/>
</div>
</div>
</form>
</div>
</div>
<div class="info-container" onclick="closeInformation()">
<div class="popup-info">
<h3>Logic Circuit Simulator</h3>
<img src="./img/fullAdder.PNG" alt="" />
<div class="tips">
<ul>
Double click to gate for naming gates
</ul>
<ul>
Double click to node for changing input value
</ul>
<ul>
You can create components. Select all integrated gates, inputs &
wires and right click. Then name your integrated circuit.
</ul>
<ul>
Hold right click to erase drawings while paint mode open.
</ul>
<ul>
Press "R" to clear all drawings.
</ul>
</div>
</div>
</div>
<button
class="toggle-paint-container"
onmouseover="openBrushMenu()"
onmouseout="closeBrushMenu()"
>
<div class="toggle-paint-menu">
<input type="color" onchange="setBrushColor(this.value)" />
<input
type="range"
min="1"
max="60"
value="5"
onchange="setBrushThickness(this.value)"
/>
</div>
<div class="paint-icon" onclick="toggleBrush(this)">
<img src="./img/paintInActive.png" alt="" />
</div>
</button>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.4.1/p5.min.js"
integrity="sha512-NxocnqsXP3zm0Xb42zqVMvjQIktKEpTIbCXXyhBPxqGZHqhcOXHs4pXI/GoZ8lE+2NJONRifuBpi9DxC58L0Lw=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
></script>
<script src="js/organizers/organizer.js"></script>
<script src="js/organizers/menuOrganizer.js"></script>
<script src="js/deleteMode.js"></script>
<script src="js/paint/brush.js"></script>
<script src="js/paint/drew.js"></script>
<script src="js/variables.js"></script>
<script src="js/functions/cloneFunctions.js"></script>
<script src="js/functions/functions.js"></script>
<script src="js/canvas.js"></script>
<script src="js/script.js"></script>
<script src="js/draggable.js"></script>
<script src="js/node.js"></script>
<script src="js/select.js"></script>
<script src="js/wires/wire.js"></script>
<script src="js/wires/hiddenWire.js"></script>
<script src="js/gates.js"></script>
<script src="js/customGate.js"></script>
</body>
</html>