-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
100 lines (100 loc) · 8.25 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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<meta name="Generator" content="Cocoa HTML Writer">
<meta name="CocoaVersion" content="2487.7">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
</style>
</head>
<body>
<p class="p1"><!DOCTYPE html></p>
<p class="p1"><html lang="en"></p>
<p class="p1"><head></p>
<p class="p1"><span class="Apple-converted-space"> </span><meta charset="UTF-8"></p>
<p class="p1"><span class="Apple-converted-space"> </span><meta name="viewport" content="width=device-width, initial-scale=1.0"></p>
<p class="p1"><span class="Apple-converted-space"> </span><title>Нумерологический Калькулятор</title></p>
<p class="p1"><span class="Apple-converted-space"> </span><style></p>
<p class="p1"><span class="Apple-converted-space"> </span>body {</p>
<p class="p1"><span class="Apple-converted-space"> </span>font-family: Arial, sans-serif;</p>
<p class="p1"><span class="Apple-converted-space"> </span>background-color: #1a1a1a;</p>
<p class="p1"><span class="Apple-converted-space"> </span>color: #fff;</p>
<p class="p1"><span class="Apple-converted-space"> </span>display: flex;</p>
<p class="p1"><span class="Apple-converted-space"> </span>justify-content: center;</p>
<p class="p1"><span class="Apple-converted-space"> </span>align-items: center;</p>
<p class="p1"><span class="Apple-converted-space"> </span>height: 100vh;</p>
<p class="p1"><span class="Apple-converted-space"> </span>margin: 0;</p>
<p class="p1"><span class="Apple-converted-space"> </span>}</p>
<p class="p1"><span class="Apple-converted-space"> </span>.calculator {</p>
<p class="p1"><span class="Apple-converted-space"> </span>background: linear-gradient(135deg, #00ffab, #0066ff);</p>
<p class="p1"><span class="Apple-converted-space"> </span>padding: 20px;</p>
<p class="p1"><span class="Apple-converted-space"> </span>border-radius: 15px;</p>
<p class="p1"><span class="Apple-converted-space"> </span>box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);</p>
<p class="p1"><span class="Apple-converted-space"> </span>text-align: center;</p>
<p class="p1"><span class="Apple-converted-space"> </span>max-width: 300px;</p>
<p class="p1"><span class="Apple-converted-space"> </span>width: 100%;</p>
<p class="p1"><span class="Apple-converted-space"> </span>}</p>
<p class="p1"><span class="Apple-converted-space"> </span>.calculator input {</p>
<p class="p1"><span class="Apple-converted-space"> </span>width: 100%;</p>
<p class="p1"><span class="Apple-converted-space"> </span>padding: 10px;</p>
<p class="p1"><span class="Apple-converted-space"> </span>margin-bottom: 10px;</p>
<p class="p1"><span class="Apple-converted-space"> </span>border: none;</p>
<p class="p1"><span class="Apple-converted-space"> </span>border-radius: 5px;</p>
<p class="p1"><span class="Apple-converted-space"> </span>outline: none;</p>
<p class="p1"><span class="Apple-converted-space"> </span>font-size: 16px;</p>
<p class="p1"><span class="Apple-converted-space"> </span>}</p>
<p class="p1"><span class="Apple-converted-space"> </span>.calculator button {</p>
<p class="p1"><span class="Apple-converted-space"> </span>width: 100%;</p>
<p class="p1"><span class="Apple-converted-space"> </span>padding: 10px;</p>
<p class="p1"><span class="Apple-converted-space"> </span>background-color: #ff007f;</p>
<p class="p1"><span class="Apple-converted-space"> </span>border: none;</p>
<p class="p1"><span class="Apple-converted-space"> </span>border-radius: 5px;</p>
<p class="p1"><span class="Apple-converted-space"> </span>color: #fff;</p>
<p class="p1"><span class="Apple-converted-space"> </span>font-size: 16px;</p>
<p class="p1"><span class="Apple-converted-space"> </span>cursor: pointer;</p>
<p class="p1"><span class="Apple-converted-space"> </span>transition: background-color 0.3s;</p>
<p class="p1"><span class="Apple-converted-space"> </span>}</p>
<p class="p1"><span class="Apple-converted-space"> </span>.calculator button:hover {</p>
<p class="p1"><span class="Apple-converted-space"> </span>background-color: #e6006f;</p>
<p class="p1"><span class="Apple-converted-space"> </span>}</p>
<p class="p1"><span class="Apple-converted-space"> </span>.result {</p>
<p class="p1"><span class="Apple-converted-space"> </span>margin-top: 15px;</p>
<p class="p1"><span class="Apple-converted-space"> </span>font-size: 18px;</p>
<p class="p1"><span class="Apple-converted-space"> </span>}</p>
<p class="p1"><span class="Apple-converted-space"> </span></style></p>
<p class="p1"></head></p>
<p class="p1"><body></p>
<p class="p1"><span class="Apple-converted-space"> </span><div class="calculator"></p>
<p class="p1"><span class="Apple-converted-space"> </span><h1>Нумерология и Веб3</h1></p>
<p class="p1"><span class="Apple-converted-space"> </span><p>Введите только день вашего рождения:</p></p>
<p class="p1"><span class="Apple-converted-space"> </span><input type="number" id="birthDay" placeholder="Например: 12" min="1" max="31"></p>
<p class="p1"><span class="Apple-converted-space"> </span><button onclick="calculateNumber()">Рассчитать</button></p>
<p class="p1"><span class="Apple-converted-space"> </span><div class="result" id="result"></div></p>
<p class="p1"><span class="Apple-converted-space"> </span></div></p>
<p class="p2"><br></p>
<p class="p1"><span class="Apple-converted-space"> </span><script></p>
<p class="p1"><span class="Apple-converted-space"> </span>function calculateNumber() {</p>
<p class="p1"><span class="Apple-converted-space"> </span>const birthDay = document.getElementById('birthDay').value;</p>
<p class="p1"><span class="Apple-converted-space"> </span>if (!birthDay || birthDay < 1 || birthDay > 31) {</p>
<p class="p1"><span class="Apple-converted-space"> </span>document.getElementById('result').innerText = "Введите корректный день (1-31).";</p>
<p class="p1"><span class="Apple-converted-space"> </span>return;</p>
<p class="p1"><span class="Apple-converted-space"> </span>}</p>
<p class="p2"><br></p>
<p class="p1"><span class="Apple-converted-space"> </span>let sum = parseInt(birthDay);</p>
<p class="p2"><br></p>
<p class="p1"><span class="Apple-converted-space"> </span>// Сводим к одной цифре</p>
<p class="p1"><span class="Apple-converted-space"> </span>while (sum > 9) {</p>
<p class="p1"><span class="Apple-converted-space"> </span>sum = sum.toString().split('').reduce((acc, digit) => acc + parseInt(digit), 0);</p>
<p class="p1"><span class="Apple-converted-space"> </span>}</p>
<p class="p2"><br></p>
<p class="p1"><span class="Apple-converted-space"> </span>document.getElementById('result').innerText = `Ваше число: ${sum}`;</p>
<p class="p1"><span class="Apple-converted-space"> </span>}</p>
<p class="p1"><span class="Apple-converted-space"> </span></script></p>
<p class="p1"></body></p>
<p class="p1"></html></p>
</body>
</html>