source: code/trunk/web/views/index.html@ 18

Last change on this file since 18 was 18, checked in by manerakai, 22 months ago

Implemented Cookies

File size: 2.6 KB
Line 
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 action="/?engine={{.Engine}}" method="POST" id="translation-form">
21
22 <div class="wrap languages">
23 <div class="language">
24 <select name="from" aria-label="Source language">
25 {{range $code, $name := .SourceLanguages}}
26 <option value="{{ $code }}" {{if eq $code $.From}}selected{{end}}>{{ $name }}</option>
27 {{end}}
28 </select>
29 </div>
30
31 <div class="switch_languages">
32 <button id="switchbutton" aria-label="Switch languages"
33 formaction="/switchlanguages/?engine={{ .Engine }}" type="submit">&lt;-&gt;</button>
34 </div>
35
36 <div class="language">
37 <select name="to" aria-label="Target language">
38 {{range $code, $name := .TargetLanguages}}
39 <option value="{{ $code }}" {{if eq $code $.To}}selected{{end}}>{{ $name }}</option>
40 {{end}}
41 </select>
42 </div>
43 </div>
44
45 <div class="wrap">
46 <div class="item-wrapper">
47 <textarea autofocus class="item" id="input" name="text" dir="auto"
48 placeholder="Enter Text Here">{{ .OriginalText }}</textarea>
49 <div class="center">
50 <audio controls>
51 <source type="audio/mpeg" src="{{ .TtsFrom }}">
52 </audio>
53 </div>
54 </div>
55
56 <div class="item-wrapper">
57 <textarea id="output" class="translation item" dir="auto" placeholder="Translation"
58 readonly>{{.TranslatedText}}</textarea>
59 <audio controls>
60 <source type="audio/mpeg" src="{{ .TtsTo }}">
61 </audio>
62 </div>
63 </div>
64
65 <br>
66
67 <div class="center">
68 <button type="submit">Translate with {{ .Engine }}!</button>
69 </div>
70
71 </form>
72 <script src="/static/script.js"></script>
73</body>
74
75</html>
Note: See TracBrowser for help on using the repository browser.