~metalune/simplytranslate_web

ref: b21ecd5ed6219438758fc75658035924c425d98f simplytranslate_web/templates/index.html -rw-r--r-- 1.6 KiB
b21ecd5emetalune Update link in index.html 5 months ago
                                                                                
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
<!doctype html>

<html>
    <head>
        <title>SWT - Simple Web Translator</title>
        <link rel="stylesheet" href="/static/home.css">
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    </head>

    <body>
        <h1>Simple Web Translator</h1>

        <form action="/" method="POST">
            <label>
                Translation Engine:
                <select name="engine">
                    <option value="google" {{'selected' if engine == 'google' else ''}}>Google</option>
                    <option value="libre" {{'selected' if engine != 'google' else ''}}>LibreTranslate</option>
                </select>
            </label>
            <br>
            <br>

            <div id="fields_container">

                <div id="language_fields_container">
                    <input type="text" id="from_language" name="from_language" value="{{ from_l }}" placeholder="from" />
                    <input type="text" id="to_language" name="to_language" value="{{ to_l }}" placeholder="to" />
                </div>

                <br>

                <textarea id="input" name="input" rows="5" placeholder="text you want to translate">{{ inp }}</textarea>
            </div>

            <br>

            <button type="submit">Translate!</button>
        </form>

        <br>

        {% if translation %}
            <b>Translation ({{ engine }}):</b><br>
            {{ translation }}
        {% endif %}

        <br>
        <br>
        <br>

        <footer>
              <a href="https://git.sr.ht/~metalune/simplytranslate_web">Source for this Website</a>
        </footer>
    </body>
</html>