-
Notifications
You must be signed in to change notification settings - Fork 90
/
index.html
72 lines (63 loc) · 1.99 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>Calque</title>
<link rel="icon" type='image/png' href="favicon.png">
<link rel="stylesheet" href="style.css">
<script src="math.min.js"></script>
<script src="calque.js"></script>
<script>
window.onload = function () {
var input = document.getElementById('input');
if (localStorage.getItem("input")) {
input.value = localStorage.getItem("input");
}
var output = document.getElementById('output');
window.calque = new Calque(input, output);
input.focus();
}
</script>
</head>
<body>
<div class="interface">
<div class="output" id="output"></div>
<textarea class="input" id="input" spellcheck="false"># Calque - reactive calculator
# Expressions
2 + 2 * 2
sqrt(3^2 + 4^2)
2 inch to cm
cos(45 deg)
# Variables
a = 25
b = a * 2
postal code = 1122
# Summing lists
animals:
cats = 2
dogs = 3
plants:
trees = 20
vegetables:
potatoes = 10
carrots = 10
# Functions
pow2(x) = x ^ 2
pow2(6)
# Last result
2 * 2
last + 1
# Keys
# Duplicate line or selection: Ctrl+D
# Change selected number: Up/Down
# Change selected number 10x: Shift+Up/Down
# Change indent: Tab/Shift+Tab
# Calque on GitHub:
# https://github.com/grimalschi/calque
# Using Math.js:
# https://github.com/grimalschi/mathjs</textarea>
</div>
<a href="https://github.com/grimalschi/calque"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/365986a132ccd6a44c23a9169022c0b5c890c387/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f7265645f6161303030302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" loading="lazy"></a>
</body>
</html>