-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
68 lines (66 loc) · 3.35 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Truth Tables</title>
<script type="text/javascript" src="js/polyfills.js"></script>
<script type="text/javascript" src="js/constants.js"></script>
<script type="text/javascript" src="js/understanding.js"></script>
<script type="text/javascript" src="js/io-control.js"></script>
<script type="text/javascript" src="js/logic.js"></script>
<script type="text/javascript" src="js/truth.js"></script>
<link rel="stylesheet" href="css/appearance.css">
<link rel="icon" href="favicon.ico" />
</head>
<body onload="io_init()">
<main>
<h1>Truth Table Generator</h1>
<div class="settings-btn" onclick="OPTIONS.show()">
<svg class="icon-settings size-32"></svg>
</div>
<hr>
<p>
Type in an expression, then hit the [Evaluate] button to see the results.
</p>
<form onsubmit="return false;">
<input type="text" id="raw-input" placeholder="Example: p ∨ ¬q" data-gramm="false">
<input type="submit" class="eval" onclick="main()" value="Evaluate">
</form>
<br/><br/>
<div id="raw-results"></div>
<table id="raw-results-sticky-header" class="hidden"></table>
<div class="notify">Copied!</div>
<div class="box-70">
<input type="button" onclick="copyAsORG()" value="Copy as ORG Table">
<textarea id='org-table' data-gramm="false"></textarea>
</div>
<div class="box-30">
<input type="button" onclick="copyAsJSON()" value="Copy as JSON"><br/>
<textarea id='json-table' data-gramm="false"></textarea>
</div>
</main>
<div class="credits">
Created by <a href="https://github.com/kyle-west" target="_blank">Kyle West</a> <br>
Hosted on <a href="https://github.com/kyle-west/truthfulness" target="_blank">GitHub</a><br>
<a href="https://github.com/kyle-west/truthfulness/issues" target="_blank">[Report an issue]</a>
</div>
<div class="modal hidden" id="settings-modal">
<div class="content">
<h1>Display Options</h1>
<hr>
<p><b>Table display:</b> Select how you would like to view the truth table results</p>
<input id="tv1" type="radio" name="table-view" value="inline"><label for="tv1">Results Inline</label></input><br/>
<input id="tv2" type="radio" name="table-view" value="expanded"><label for="tv2">Expanded View</label></input><br/><br/>
<p><b>Boolean Representation:</b> Select which way you would like to have True / False displayed</p>
<input id="b1" type="radio" name="true-false" value="binary"><label for="b1">True as "1", False as "0"</label></input><br/>
<input id="b2" type="radio" name="true-false" value="letter"><label for="b2">True as "T", False as "F"</label></input><br/>
<div class="footer">
<button type="button" class="done" onclick="OPTIONS.save()">Save</button>
<button type="button" class="cancel" onclick="OPTIONS.close(true)">Cancel</button>
</div>
</div>
</div>
<script type="text/javascript" src="js/preferences.js"></script>
<script type="text/javascript" src="js/sticky-header.js"></script>
</body>
</html>