forked from Robert-Furth/xsampa-to-ipa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
60 lines (46 loc) · 1.58 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
<!DOCTYPE html>
<html lang="en-US">
<head>
<!-- Meta -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Convert X-SAMPA text into IPA symbols.">
<title>X-SAMPA to IPA Converter</title>
<link rel="stylesheet" href="https://code.cdn.mozilla.net/fonts/fira.css">
<link rel="stylesheet" href="css/xsampa-to-ipa.css">
<script src="js/xsampa-to-ipa.js"></script>
</head>
<body>
<header>
<h1>X-SAMPA to IPA Converter</h1>
</header>
<main>
<p>
Type some <a href=https://www.wikipedia.org/wiki/X-SAMPA>X-SAMPA</a> text into the first box.
Its <a href=https://www.wikipedia.org/wiki/International_Phonetic_Alphabet>IPA</a> equivalent
will appear in the second box.
</p>
<div id="converter-area">
<div class="converter-column">
<div>
<label>Enter X-SAMPA text here
<textarea id="xsampa-input" spellcheck="false" autofocus></textarea>
</label>
</div>
</div>
<div class="converter-column">
<div>
<label>IPA translation will appear here
<textarea id="ipa-output" spellcheck="false" readonly></textarea>
</label>
</div>
</div>
</div>
</main>
<script>
document.getElementById("xsampa-input").addEventListener("input", function(event) {
document.getElementById("ipa-output").value = convert(event.target.value);
});
</script>
</body>
</html>