-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.html
More file actions
177 lines (166 loc) · 6.95 KB
/
Copy pathindex.html
File metadata and controls
177 lines (166 loc) · 6.95 KB
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
<!DOCTYPE html>
<html lang="en">
<link rel="stylesheet" href="styles/index.css">
<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>flap.js</title>
<link rel="apple-touch-icon" sizes="180x180" href="assets/apple-touch-icon.png">
<link rel="icon" type="image/png" href="assets/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="assets/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="assets/site.webmanifest">
<meta name="theme-color" content="#ffffff">
<script defer src="scripts/index.js" type="module"></script>
</head>
<body>
<!-- Side navigation -->
<div id="menu-container">
<img src="assets/menu.svg" alt="menu icon" class="menu-icon"/>
</div>
<div class="nav" id="nav">
<ul>
<li class="nav-btn", id="home-icon">
<img src="assets/home.svg" alt="home icon" class="icon"/>
<span class="nav-label">Home</span>
</li>
<li class="nav-btn" id="machine-icon">
<img src="assets/machine.svg" alt="machine icon" class="icon"/>
<span class="nav-label">Machine</span>
</li>
<li class="nav-btn" id="save-icon">
<img src="assets/save.svg" alt="save icon" class="icon"/>
<span class="nav-label">Save</span>
</li>
<li class="nav-btn" id="bug-icon">
<img src="assets/bug.svg" alt="bug icon" class="icon"/>
<span class="nav-label">Report</span>
</li>
<li class="nav-btn" id="help-icon">
<img src="assets/help.svg" alt="help icon" class="icon"/>
<span class="nav-label">Help</span>
</li>
</ul>
</div>
<section id="secondbar">
<div id="secondBarHeader">
<div id="secondBarHeaderTitle">
<h1>Header</h1>
</div>
<div id="secondBarHeaderBtn">
<button id="close-button">
<img src="assets/close.svg" alt="close icon"/>
</button>
</div>
</div>
<div class="dropdown home">
<div class=machine_inputs>
</div>
<div id="plus_minus_div">
<button class="pmbtn" id="plus_button">+</button>
<button class="pmbtn" id="minus_button">–</button>
</div>
<div id="input_instructions">
<ul>
<li>R - Run Input on Machine</li>
<li>S - Step Input on Machine</li>
<li>X - Reset Step Function</li>
</ul>
</div>
</div>
<div class = "dropdown settings">
<select id="select_machine">
<option value="NFA">Finite Automata</option>
<option value="PDA">Pushdown Automata</option>
<option value="Turing">Turing Machine</option>
<option value="Moore">Moore</option>
<option value="Mealy">Mealy</option>
<option value="Regex">Regex</option>
</select>
<button class="NFA_specific" id="NFA_to_DFA" >NFA to DFA</button>
</div>
<div hidden class="dropdown save">
<button id="save_machine">Save as png</button> <br>
<button id="permalink">Permalink</button> <br>
<button id="latex">Latex</button> <br>
</div>
</section>
<!-- Tutorial Popup -->
<div id="overlay">
<div class="popup">
<div class="popup-content">
<div id="popup-close-div">
<button id="tutorial_close_btn">
<img src="assets/close.svg" alt="close icon"/>
</button>
</div>
<div class = "popup-pages">
<div class = "popup-content-pg1" id = 'pg1'>
<h2>The Basics</h2>
<div>Double click to create vertices, additional double clicks to toggle final</div>
<div>Right press on a vertex (or ctrl/cmd) and drag to create an edge</div>
<div>Right click on vertices or edge texts to open menu</div>
<div>"ctrl/cmd+z" to undo, "ctrl/cmd+shift+z" to redo</div>
<div>"dd" to delete (quickly press 'd' two times)</div>
<div>drag an item over the trash to delete or click the trash to delete everything</div>
<img src = "tutorial_GIFs/basics_V2.gif">
<p></p>
<button class ='next-btn' id="nextBtn_1to2">Next >></button>
</div>
<div class = "popup-content-pg2" id = 'pg2'>
<h2>Running Input</h2>
<p>Enter the input string and press run.</p>
<img src = "tutorial_GIFs/run_input_V2.gif">
<p></p>
<button class ='prev-btn' id="prevBtn_2to1"><< Prev</button>
<button class ='next-btn' id="nextBtn_2to3">Next>></button>
</div>
<div class = "popup-content-pg3" id = 'pg3'>
<h2>Stepping Through Input</h2>
<p>You can also step through the computation one character at a time.</p>
<img src = "tutorial_GIFs/step_through_V2.gif">
<p></p>
<button class ='prev-btn' id="prevBtn_3to2"><< Prev</button>
<button class ='next-btn' id="nextBtn_3to4">Next>></button>
</div>
<div class = "popup-content-pg4" id = 'pg4'>
<h2>Download PNG</h2>
<p>After you finish drawing your automaton, you can download a PNG of the drawing by clicking "Save as png" on the toolbar.</p>
<img src = "tutorial_GIFs/save_img_V2.gif">
<p></p>
<button class ='prev-btn' id="prevBtn_4to3"><< Prev</button>
<button class ='next-btn' id="nextBtn_4to5">Next>></button>
</div>
<div class = "popup-content-pg5" id = 'pg5'>
<h2>Permalink</h2>
<p>This feature enables sharing machine drawings. Permalink stands for permanent link, meaning once you have created a link to share with your others, that link can uniquely decode back to a machine.</p>
<img src = "tutorial_GIFs/permalink_V2.gif">
<p></p>
<button class ='prev-btn' id="prevBtn_5to4"><< Prev</button>
<button class ='next-btn' id="tutorial_finish_btn">Finish</button>
</div>
</div>
</div>
</div>
</div>
<div class="regex">
<div class="regex-content">
<label for='regex_string'>Regular Expression String: </label>
<input type="text" id="regex_string" name="regex_string">
<br>
<button type="button" id='OPEN' value="("> ( </button>
<button type="button" id='CLOSE' value=")"> ) </button>
<button type="button" id='UNION' value="∪"> ∪ </button>
<button type="button" id='CONCAT' value="◦"> ◦ </button>
<button type="button" id='KLEENE' value="*"> * </button>
<button type="button" id='SIGMA' value="Σ"> Σ </button>
<button type="button" id='EMPTY_SET' value="∅"> ∅ </button>
<br>
<button type="button" id="convert_to_nfa">Convert to NFA</button>
</form>
</div>
</div>
<!-- the big canvas that we draw on -->
<canvas class='NFA_specific PDA_specific Turing_specific' id='machine_drawing'>Your browser does not support canvas</canvas>
</body>
</html>