1 | <!doctype html>
|
---|
2 | <html lang="en">
|
---|
3 |
|
---|
4 | <head>
|
---|
5 | <title>SimplyTranslate</title>
|
---|
6 | <link rel="shortcut icon" href="/static/favicon.ico">
|
---|
7 | <meta name="description" content="Experience simple and private Google translations">
|
---|
8 | <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
---|
9 | <meta charset="UTF-8">
|
---|
10 | <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline'">
|
---|
11 | <meta name="referrer" content="no-referrer">
|
---|
12 | <link rel="stylesheet" href="/static/style.css">
|
---|
13 | </head>
|
---|
14 |
|
---|
15 | <body>
|
---|
16 | <header class="center">
|
---|
17 | <h1>SimplyTranslate</h1>
|
---|
18 | </header>
|
---|
19 |
|
---|
20 | <form method="POST" id="translation-form">
|
---|
21 |
|
---|
22 | <input type="hidden" name="engine" value="{{.Engine}}">
|
---|
23 |
|
---|
24 | <div class="wrap languages">
|
---|
25 | <div class="language">
|
---|
26 | <select name="from" aria-label="Source language">
|
---|
27 | {{range $code, $name := .SourceLanguages}}
|
---|
28 | <option value="{{ $code }}" {{if eq $code $.From}}selected{{end}}>{{ $name }}</option>
|
---|
29 | {{end}}
|
---|
30 | </select>
|
---|
31 | </div>
|
---|
32 |
|
---|
33 | <div class="switch_languages">
|
---|
34 | <button id="switchbutton" aria-label="Switch languages"
|
---|
35 | formaction="/switchlanguages/?engine={{ .Engine }}" type="submit"><-></button>
|
---|
36 | </div>
|
---|
37 |
|
---|
38 | <div class="language">
|
---|
39 | <select name="to" aria-label="Target language">
|
---|
40 | {{range $code, $name := .TargetLanguages}}
|
---|
41 | <option value="{{ $code }}" {{if eq $code $.To}}selected{{end}}>{{ $name }}</option>
|
---|
42 | {{end}}
|
---|
43 | </select>
|
---|
44 | </div>
|
---|
45 | </div>
|
---|
46 |
|
---|
47 | <div class="wrap">
|
---|
48 | <div class="item-wrapper">
|
---|
49 | <textarea autofocus class="item" id="input" name="text" dir="auto"
|
---|
50 | placeholder="Enter Text Here">{{ .OriginalText }}</textarea>
|
---|
51 | <div class="center">
|
---|
52 | <audio controls>
|
---|
53 | <source type="audio/mpeg" src="{{ .TtsFrom }}">
|
---|
54 | </audio>
|
---|
55 | </div>
|
---|
56 | </div>
|
---|
57 |
|
---|
58 | <div class="item-wrapper">
|
---|
59 | <textarea id="output" class="translation item" dir="auto" placeholder="Translation"
|
---|
60 | readonly>{{.TranslatedText}}</textarea>
|
---|
61 | <audio controls>
|
---|
62 | <source type="audio/mpeg" src="{{ .TtsTo }}">
|
---|
63 | </audio>
|
---|
64 | </div>
|
---|
65 | </div>
|
---|
66 |
|
---|
67 | <br>
|
---|
68 |
|
---|
69 | <div class="center">
|
---|
70 | <button type="submit">Translate with {{ .Engine }}!</button>
|
---|
71 | </div>
|
---|
72 |
|
---|
73 | </form>
|
---|
74 | <script src="/static/script.js"></script>
|
---|
75 | </body>
|
---|
76 |
|
---|
77 | </html>
|
---|