-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
242 lines (217 loc) · 9.42 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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Dhamma Full Text Search</title>
<!-- Use this https://gtmetrix.com to check your site performance, -->
<!-- Gives useful insights and suggestions: enable text compression, cache policy etc... -->
<!-- Using https://realfavicongenerator.net to generate this -->
<link rel="apple-touch-icon" sizes="180x180" href="lib/icons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="lib/icons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="lib/icons/favicon-16x16.png">
<link rel="manifest" href="lib/icons/site.webmanifest">
<link rel="mask-icon" href="lib/icons/safari-pinned-tab.svg" color="#5bbad5">
<link rel="shortcut icon" href="lib/icons/favicon.ico">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-config" content="lib/icons/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<!-- ends icons 05 Feb 2021 -->
<link rel="stylesheet" href="lib/css.css">
</head>
<body>
<div id="uForm">
<form name="mainform" id="mainform" method="POST" action="https://dhammafts.onrender.com/fts.php" enctype="multipart/form-data" style="padding: 5px;">
<b>Dhamma Full Text Search v1.1.0</b>
<table class="tCenter">
<tr><td class="tLeft" colspan="4"><span class="greyText">Search Database</span></td></tr>
<tr>
<td class="tRight">
<label class="form-switch"><input type="radio" id="palitptk" name="database" value="palitptk"><i></i></label>
</td>
<td class="tLeft">Pāḷi tipiṭaka</td>
<td class="tRight">
<label disabled class="form-switch"><input type="radio" id="dictionary" name="database" value="dictionary"><i></i></label>
</td>
<td class="tLeft">Pāḷi Dictionary</td>
</tr>
<tr></tr>
<tr></tr>
<tr>
<td class="tRight">
<label disabled class="form-switch"><input checked type="radio" id="elibrary" name="database" value="elibrary"><i></i></label>
</td>
<td class="tLeft">Pa-Auk Manual</td>
<td class="tRight">
<label disabled class="form-switch"><input type="radio" id="ttpv_budsas.net" name="database" value="ttpv_budsas.net"><i></i></label>
</td>
<td class="tLeft">Tam Tạng Pāḷi Việt</td>
</tr>
<tr></tr>
<tr></tr>
<!-- Personal offline db only -->
<!-- <tr>
<td class="tRight">
<label disabled class="form-switch"><input type="radio" id="pnebook6jan2021" name="database" value="pnebook6jan2021"><i></i></label>
</td>
<td class="tLeft">eBooks06Jan</td>
<td class="tRight">
<label disabled class="form-switch"><input type="radio" id="engsentence" name="database" value="engsentence"><i></i></label>
</td>
<td class="tLeft">EngSyntax</td>
</tr> -->
<!-- Personal offline db only -->
</table>
<!-- Select elements generated by Javascript must be inside this form element to allow $_POST to catch -->
<!-- <p style="display:none;" id="buildPaliScriptMenu">Use static HTML code for faster</p> -->
<p style="display:none;" id="buildPaliScriptMenu">
<label for="uSelectScript">Pāḷi tipiṭaka display script</label>
<select id="uSelectScript" name="uSelectScript">
<option disabled="" value="">--Please choose an option--</option>
<option value="si">Sinhala - සිංහල</option>
<option value="hi">Devanagari - हिन्दी</option>
<option value="ro">Roman - Roman</option>
<option value="th">Thai - ไทย</option>
<option value="lo">Laos - ລາວ</option>
<option value="my">Myanmar - ဗမာစာ</option>
<option value="km">Khmer - ភាសាខ្មែរ</option>
<option value="be">Bengali - বাংলা</option>
<option value="gm">Gurmukhi - ਗੁਰਮੁਖੀ</option>
<option value="gj">Gujarati - ગુજરાતી</option>
<option value="te">Telugu - తెలుగు</option>
<option value="ka">Kannada - ಕನ್ನಡ</option>
<option value="mm">Malayalam - മലയാളം</option>
<option value="tt">Tai Tham - Tai Tham LN</option>
<option value="br">Brahmi - Brāhmī</option>
<option value="tb">Tibetan - བོད་སྐད།</option>
<option value="cy">Cyrillic - кириллица</option>
</select>
</p>
<textarea required rows="2" id="uType" name="uType" placeholder="हिन्दी latin(velthuis) ဗမာစာ සිංහල..." value=""></textarea>
<br><span id="clearText">Clear Text</span><br>
<table class="tCenter">
<tr><td class="tLeft" colspan="4"><span class="greyText">Search Mode</span></td></tr>
<tr>
<td class="tRight">
<label class="form-switch"><input checked type="radio" id="dts" name="sMode" value="dts" /><i></i></label>
</td>
<td class="tLeft">Word distance</td>
<td class="tRight">
<label class="form-switch"><input type="radio" id="fts" name="sMode" value="fts" /><i></i></label>
</td>
<td class="tLeft">Exactly match</td>
</tr>
<tr></tr>
<tr></tr>
<tr>
<td class="tRight">
<label class="form-switch"><input type="radio" id="sms" name="sMode" value="sms" /><i></i></label>
</td>
<td class="tLeft">Simple match</td>
<td class="tRight">
<label class="form-switch"><input type="radio" id="pfs" name="sMode" value="pfs" /><i></i></label>
</td>
<td class="tLeft">Prefix</td>
</tr>
</table>
<br>Order by <label class="circleRadio"><input checked type="radio" id="rank" name="order" value="rank" />
Rank</label>
<label class="circleRadio" style="font-weight:lighter;"><input type="radio" id="path" name="order" value="path" />
File path</label>
<label class="circleRadio"><input type="radio" id="bm25" name="order" value="bm25" /> BM25</label>
<table class="tCenter">
<tr>
<td class="tLeft">Word distance range</td>
<td class="tLeft"><input id="dval" name="dval" value="10" placeholder="in distance mode" /></td>
</tr>
<tr>
<td class="tLeft">Extract text length</td>
<td class="tLeft"><input id="etl" name="etl" value="64" placeholder="Accept: 0-64" /></td>
</tr>
<tr>
<td class="tLeft">Limit hit setting</td>
<td class="tLeft"><input id="limit" name="limit" value="999" placeholder="9999" /></td>
</tr>
</table>
<br>
<button id="searchButton"> Search </button>
<div style="display: none;">
<!-- For converted pāḷi script -->
<textarea id="uType2" name="uType2" value=""></textarea>
</div>
</form>
</div>
<br>
<div id="allResults">
<!-- Result will be written here start-->
<p class='center'><a href='lib/README.html'>Read me</a></p>
<div id='velthuis'>
<table class="tCenter">
<tr>
<th colspan=8>Latin Velthuis scheme (modified):</th>
</tr>
<tr>
<td colspan=8>Type & get, example: aa => ā</td>
</tr>
<tr>
<td class="tCenter">aa</td>
<td class="tCenter">ā</td>
<td class="tCenter">ii</td>
<td class="tCenter">ī</td>
<td class="tCenter">uu</td>
<td class="tCenter">ū</td>
<td class="tCenter">m..</td>
<td class="tCenter">ṁ</td>
</tr>
<tr>
<td class="tCenter">.m</td>
<td class="tCenter">ṃ</td>
<td class="tCenter">.n</td>
<td class="tCenter">ṇ</td>
<td class="tCenter">.d</td>
<td class="tCenter">ḍ</td>
<td class="tCenter">.l</td>
<td class="tCenter">ḷ</td>
</tr>
<tr>
<td class="tCenter">.r</td>
<td class="tCenter">ṛ</td>
<td class="tCenter">.s</td>
<td class="tCenter">ṣ</td>
<td class="tCenter">s..</td>
<td class="tCenter">ś</td>
<td class="tCenter">.t</td>
<td class="tCenter">ṭ</td>
</tr>
<tr>
<td class="tCenter">,,n</td>
<td class="tCenter">ñ</td>
<td class="tCenter">n..</td>
<td class="tCenter">ṅ</td>
</tr>
</table>
</div>
<!-- Result will be written here ends -->
<p style="text-align: center; color: #ccc;"> Thanks Render.com for <a target="_blank" style="text-decoration: none; color: #ccc;" href="https://dhammafts.onrender.com"> [this]</a> free back-end server.</p>
</div>
<br>
<script>
/*A call to wake up server
fetch("https://dhammafts.onrender.com/fts.php", { method: "post", body: { pnry: "nbn" } })
.then(res => res.text())
.catch(errors => {
console.log(errors);
});*/
fetch("https://dhammafts.onrender.com", {
method: "GET",
})
.then(res => console.log("Waken up"))
.catch(errors => {
console.log(errors);
});
// Other code are moved to nbn.js
</script>
<script src="lib/paliScriptConverter.js" defer></script>
<script src="lib/nbn.js" defer></script>
</body>
</html>