-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.html
202 lines (181 loc) · 8.17 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Sweph-Wasm">
<meta name="author" content="u-blusky">
<meta name="generator" content="">
<title>Sweph-Wasm</title>
<link rel="shortcut icon" href="assets/img/favicon.ico" type="image/x-icon">
<link rel="icon" href="assets/img/favicon.ico" type="image/x-icon">
<link href="assets/css/bootstrap.min.css" rel="stylesheet">
<style>
.myDivLonLat {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: flex-start;
}
.myPadding {
padding: .375rem .75rem !important;
}
.myTable {
padding: 0 !important;
margin: 0 !important;
width: 100%;
}
.myTable th:first-of-type {
text-align: right;
}
.myTable th {
text-align: center;
padding-right: 40px;
}
.myTable td {
text-align: right;
padding-right: 40px;
}
</style>
</head>
<body class="bg-light">
<div class="container">
<main>
<div class="text-center" style="margin:50px auto;max-width:700px;">
<h2>Sweph-Wasm</h2>
<p class="lead">Test page for Sweph-Wasm. Allows you to calculate the position of planets, asteroids and houses
in a range of dates that goes from the year 1800 to 2400.</p>
</div>
<div class="row g-5" style="margin:0 auto;max-width:700px;">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12" style="margin-top:0;">
<h4 class="d-flex justify-content-between align-items-center mb-3">
<span class="text-primary">Input data</span>
</h4>
<ul class="list-group mb-3">
<li class="list-group-item d-flex justify-content-between lh-sm">
<div class="col-sm-5">
<h6 class="my-0">Date</h6>
<small class="text-muted">Range years 1800 - 2400</small>
</div>
<div class="col-sm-7">
<input type="date" id="initDate" class="form-control" min="1800-01-01" max="2040-12-31"
pattern="\d{4}-\d{2}-\d{2}" required />
</div>
</li>
<li class="list-group-item d-flex justify-content-between lh-sm">
<div class="col-sm-5">
<h6 class="my-0">Time</h6>
<small class="text-muted">Time in UT (Universal Time)</small>
</div>
<div class="col-sm-7">
<input type="time" id="initTime" class="form-control" required />
</div>
</li>
<li class="list-group-item d-flex justify-content-between lh-sm">
<div class="col-sm-5">
<h6 class="my-0">Longitude</h6>
<small class="text-muted">For Calculate houses</small>
</div>
<div class="col-sm-7">
<div class="myDivLonLat">
<div style="width: 60px;margin-right:5px;">
<input type="text" id="lonG" class="form-control myPadding"
oninput="this.value = this.value.replace(/[^0-9]/g, ''); this.value = this.value.replace(/(\..*)\./g, '$1');"
required />
</div>
<div style="width: 10px;">°</div>
<div style="width: 50px;margin-right:5px;">
<input type="text" id="lonM" class="form-control myPadding"
oninput="this.value = this.value.replace(/[^0-9]/g, ''); this.value = this.value.replace(/(\..*)\./g, '$1');"
required />
</div>
<div style="width: 10px;margin-right:5px;">'</div>
<div style="width: 50px;">
<input type="text" id="lonS" class="form-control myPadding"
oninput="this.value = this.value.replace(/[^0-9]/g, ''); this.value = this.value.replace(/(\..*)\./g, '$1');"
required />
</div>
<div style="width: 10px;">"</div>
<select class="form-select myPadding" id="lonEW" style="margin-left:5px;width:90px;" required>
<option value="E">E</option>
<option value="W">W</option>
</select>
</div>
</div>
</li>
<li class="list-group-item d-flex justify-content-between lh-sm">
<div class="col-sm-5">
<h6 class="my-0">Latitude</h6>
<small class="text-muted">For calculate houses</small>
</div>
<div class="col-sm-7">
<div class="myDivLonLat">
<div style="width: 60px;margin-right:5px;">
<input type="text" id="latG" class="form-control myPadding"
oninput="this.value = this.value.replace(/[^0-9]/g, ''); this.value = this.value.replace(/(\..*)\./g, '$1');"
required />
</div>
<div style="width: 10px;">°</div>
<div style="width: 50px;margin-right:5px;">
<input type="text" id="latM" class="form-control myPadding"
oninput="this.value = this.value.replace(/[^0-9]/g, ''); this.value = this.value.replace(/(\..*)\./g, '$1');"
required />
</div>
<div style="width: 10px;margin-right:5px;">'</div>
<div style="width: 50px;">
<input type="text" id="latS" class="form-control myPadding"
oninput="this.value = this.value.replace(/[^0-9]/g, ''); this.value = this.value.replace(/(\..*)\./g, '$1');"
required />
</div>
<div style="width: 10px;">"</div>
<select class="form-select myPadding" id="latNS" style="margin-left:5px;width:90px;" required>
<option value="N">N</option>
<option value="S">S</option>
</select>
</div>
</div>
</li>
<li class="list-group-item d-flex justify-content-between lh-sm">
<div class="col-sm-5">
<h6 class="my-0">House System</h6>
<small class="text-muted">For calculate houses</small>
</div>
<div class="col-sm-7">
<select class="form-select myPadding" id="houseSystem" style="margin-left:5px;" required>
<option value="P">Placidus</option>
<option value="O">Porphyrius</option>
<option value="E">Equal</option>
</select>
</div>
</li>
</ul>
<button type="button" id="btnCalculate" class="btn btn-secondary"
style="width:200px;float:right;">Calculate</button>
</div>
<div id="resultDiv" class="col-xs-12 col-sm-12 col-md-12 col-lg-12"
style="white-space:pre;font-family: monospace;font-size: 14px;padding: 0;">
</div>
</div>
</main>
<footer class="my-5 pt-5 text-muted text-center text-small">
<p class="mb-1">Sweph-Wasm based on <a href="https://www.astro.com/swisseph/swephinfo_e.htm?"
target="_blank">©Swiss Ephemeris</a></p>
</footer>
</div>
<div class="toast-container position-fixed bottom-0 end-0 p-3">
<div id="liveToast" class="toast" role="alert" aria-live="assertive" aria-atomic="true">
<div class="toast-header">
<strong class="me-auto">Sweph-Wasm</strong>
<small>Oops! Check the data</small>
<button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
</div>
<div id="toastbody" class="toast-body"></div>
</div>
</div>
<script type="text/javascript" src="assets/js/bootstrap.bundle.min.js"></script>
<script type="text/javascript" src="assets/js/jquery-3.6.4.min.js"></script>
<script type="text/javascript" src="assets/js/moment.min.js"></script>
<!-- <script type="text/javascript" src="js/preloadData.js"></script> -->
<script type="text/javascript" src="js/calculate.js"></script>
</body>
</html>