diff options
Diffstat (limited to 'index.html')
-rw-r--r-- | index.html | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/index.html b/index.html new file mode 100644 index 0000000..ef717e5 --- /dev/null +++ b/index.html @@ -0,0 +1,80 @@ +<!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"> + <title>CleanLogic</title> + <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> + <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css"> + <style type="text/css"> + textarea { + font-family: monospace; + resize: vertical; + width: 100%; + } + + textarea#expressions { + height: 200px; + } + + textarea#truthtable { + height: 400px; + } + </style> + </head> + <body> + <div class="container"> + <h1>CleanLogic</h1> + <p class="lead">Logic toolbox in <a href="http://clean.cs.ru.nl/Clean" target="_blank">Clean</a></p> + <p>Copyright © 2015 Camil Staps. This project is licensed under the MIT license. For more details, see the <a href="LICENSE" target="_blank">LICENSE</a> file.</p> + <p>This project is maintained on <a href="https://github.com/camilstaps/CleanLogic" target="_blank">GitHub</a>. For more information, see the <a href="README.md">readme file</a>.</p> + + <hr/> + + <div class="row"> + <div class="col-md-3"> + <h2>Expressions</h2> + <p>Enter expressions here, one per line:</p> + <textarea class="form-control" id="expressions">p & q -> q & p</textarea> + <a href="#legend" data-toggle="collapse" class="pull-right">Legend</a><br/> + <div class="collapse" id="legend"> + <table class="table table-condensed table-striped"> + <tr><th>Name</th><th>Normally</th><th>Here</th></tr> + <tr><td>Negation</td><td>¬</td><td><code>~</code></td></tr> + <tr><td>Conjunction</td><td>∧</td><td><code>&</code></td></tr> + <tr><td>Disjunction</td><td>∨</td><td><code>|</code></td></tr> + <tr><td>Implication</td><td>→</td><td><code>-></code></td></tr> + <tr><td>Equivalence</td><td>↔</td><td><code><-></code></td></tr> + </table> + </div> + <div class="checkbox"><label for="extended" title="Display intermediate steps (max. one expression)"><input type="checkbox" id="extended"> Intermediate steps</label></div> + <button class="btn btn-primary" id="view">View</button> + </div> + <div class="col-md-9"> + <h2>Truth table</h2> + <p>Truth tables are generated with a server-side <a href="http://clean.cs.ru.nl/Clean" target="_blank">Clean</a> program.</p> + <textarea class="form-control" id="truthtable"></textarea> + </div> + </div> + </div> + + <script src="https://code.jquery.com/jquery-2.1.4.min.js"></script> + <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> + <script> + $('#view').click(function(){ + console.log($('#expressions').val().split("\n")); + $.ajax({ + url: 'request.php', + data: { + extended: $('#extended').prop('checked'), + expressions: $('#expressions').val().split("\n") + }, + success: function (data) { + $('#truthtable').val(data); + } + }); + }).trigger('click'); + </script> + </body> +</html> |