-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
103 lines (99 loc) · 3.7 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Gematria Calculator</title>
<style>
body {
font-family: Arial, sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #f5f5f5;
}
.container {
text-align: center;
padding: 20px;
background: white;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
input[type="text"] {
width: 300px;
padding: 10px;
margin: 10px 0;
border: 1px solid #ddd;
border-radius: 4px;
}
button {
padding: 10px 20px;
border: none;
border-radius: 4px;
background-color: #007bff;
color: white;
cursor: pointer;
}
button:hover {
background-color: #0056b3;
}
.result {
margin-top: 20px;
font-size: 1.2em;
}
</style>
</head>
<body>
<div class="container">
<h1>Gematria Calculator</h1>
<input type="text" id="inputText" placeholder="Enter text here" />
<button onclick="calculateGematria()">Calculate</button>
<div class="result" id="result"></div>
</div>
<script>
function calculateGematria() {
const inputText = document.getElementById('inputText').value.toUpperCase();
// Define letter values for different types of Gematria
const gematriaValues = {
jewish: {
A: 1, B: 2, C: 3, D: 4, E: 5, F: 6, G: 7, H: 8, I: 9, J: 600, K: 10,
L: 20, M: 30, N: 40, O: 50, P: 60, Q: 70, R: 80, S: 90, T: 100, U: 200,
V: 700, W: 900, X: 300, Y: 400, Z: 500
},
english: {
A: 6, B: 12, C: 18, D: 24, E: 30, F: 36, G: 42, H: 48, I: 54, J: 60, K: 66,
L: 72, M: 78, N: 84, O: 90, P: 96, Q: 102, R: 108, S: 114, T: 120,
U: 126, V: 132, W: 138, X: 144, Y: 150, Z: 156
},
simple: {
A: 1, B: 2, C: 3, D: 4, E: 5, F: 6, G: 7, H: 8, I: 9, J: 10, K: 11,
L: 12, M: 13, N: 14, O: 15, P: 16, Q: 17, R: 18, S: 19, T: 20, U: 21,
V: 22, W: 23, X: 24, Y: 25, Z: 26
}
};
// Function to calculate total value for a given gematria system
function getTotalValue(values) {
let total = 0;
for (let char of inputText) {
if (values[char] !== undefined) {
total += values[char];
}
}
return total;
}
// Calculate totals for each type of Gematria
const jewishTotal = getTotalValue(gematriaValues.jewish);
const englishTotal = getTotalValue(gematriaValues.english);
const simpleTotal = getTotalValue(gematriaValues.simple);
// Display results
document.getElementById('result').innerHTML = `
<p>Total Gematria Value (Jewish): ${jewishTotal}</p>
<p>Total Gematria Value (Base 6 English): ${englishTotal}</p>
<p>Total Gematria Value (Simple): ${simpleTotal}</p>
`;
}
</script>
</body>
</html>