-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
258 lines (247 loc) · 5.05 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
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
<!doctype html>
<html>
<head>
<title>go-தமிழ் playground</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.2/font/bootstrap-icons.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("#run").click(function(){
var d = $("#code").val()
//alert(d)
$.ajax({
url: 'http://localhost:8080/trans',
type: 'POST',
data: {"text" : d},
success: function (response) {
$("#output").html("<h1>"+response+"</h1>")
},
error: function () {
alert("error");
}
});
//$("#div1").load("demo_test.txt", function(responseTxt, statusTxt, xhr){
// if(statusTxt == "success")
// alert("External content loaded successfully!");
// if(statusTxt == "error")
// alert("Error: " + xhr.status + ": " + xhr.statusText);
//});
//alert("Hurray!!!!")
//$("#output").html("<strong>Hare O Sambho!!!</strong>")
});
$("#help").click(function(){
location.href="http://localhost:8080/help"
});
$("#dynamic").change(function(){
if ($("#dynamic").is(":checked")) {
$("#run")
}
});
$("#code").on('input', function() {
if ($("#dynamic").is(":checked")) {
$("#run").click();
}
});
});
</script>
</head>
<style>
html {
height: 100%;
}
body {
color: black;
padding: 0;
margin: 0;
width: 100%;
height: 100%;
background: url("https://github.com/kspviswa/gothamizh/raw/master/go_thamozh.png") no-repeat;
background-position: right;
}
a {
color: #009;
}
#wrap,
#about {
padding: 5px;
margin: 0;
position: absolute;
top: 50px;
bottom: 85%;
left: 0;
right: 0;
background: #FFD;
}
#about {
display: none;
z-index: 1;
padding: 10px 40px;
font-size: 16px;
font-family: sans-serif;
overflow: auto;
}
#about p {
max-width: 520px;
}
#about ul {
max-width: 480px;
}
#about li {
margin-bottom: 1em;
}
#code, #output, pre, .lines {
/* The default monospace font on OS X is ugly, so specify Menlo
* instead. On other systems the default monospace font will be used. */
font-family: Menlo, monospace;
font-size: 11pt;
}
#code {
color: black;
background: inherit;
width: 100%;
height: 100%;
padding: 0; margin: 0;
border: none;
outline: none;
resize: none;
wrap: on;
float: right;
}
#output {
position: absolute;
top: 25%;
bottom: 0;
left: 0;
right: 0;
padding: 8px;
}
#output .system, #output .loading {
color: #999;
}
#output .stderr, #output .error {
color: #900;
}
#output pre {
margin: 0;
}
#banner {
position: absolute;
left: 0;
right: 0;
top: 0;
height: 50px;
background-color: #E0EBF5;
}
#head {
float: left;
padding: 15px 10px;
font-size: 25px;
font-family: sans-serif;
}
#controls {
float: left;
padding: 10px 15px;
min-width: 245px;
}
#controls > input {
border-radius: 5px;
}
#aboutControls {
float: right;
padding: 10px 15px;
}
input[type=button],
#importsBox {
height: 30px;
border: 1px solid #375EAB;
font-size: 16px;
font-family: sans-serif;
background: #375EAB;
color: white;
position: static;
top: 1px;
border-radius: 5px;
}
#importsBox {
position: relative;
display: inline;
padding: 5px 0;
margin-right: 5px;
}
#importsBox input {
position: relative;
top: -2px;
left: 1px;
height: 10px;
width: 10px;
}
#shareURL {
width: 280px;
font-size: 16px;
border: 1px solid #ccc;
background: #eee;
color: black;
height: 23px;
}
#embedLabel {
font-family: sans-serif;
}
.lines {
float: left;
overflow: hidden;
text-align: right;
}
.lines div {
padding-right: 5px;
color: lightgray;
}
.lineerror {
color: red;
background: #FDD;
}
.exit {
color: lightgray;
}
.embedded #banner {
display: none;
}
.embedded #wrap {
top: 0;
}
#embedRun {
display: none;
}
.embedded #embedRun {
display: block;
position: absolute;
z-index: 1;
top: 10px;
right: 10px;
}
img {
max-width: 100%;
max-height: 100%;
}
.fit {
height: 80px;
width: 30px;
}
</style>
<body>
<div id="banner">
<div id="head" itemprop="name">
go-தமிழ் playground
</div>
<div id="controls">
<input type="button" value="Transliterate..." id="run">
<input type="checkbox" id="dynamic" checked="true"> Enable auto transliterate
<input type="button" value="go-தமிழ் unicode help" id="help">
</div>
</div>
<div id="wrap">
<textarea itemprop="description" id="code" name="code"
placeholder="தங்களது தமிழ் வார்த்தைகளை இங்கு உள்ளிடவும் !!!"></textarea>
</div>
<div id="output"></div>
</body>
</html>