gtranslate/templates/index.html

31 lines
974 B
HTML
Raw Normal View History

2021-01-17 20:09:57 +00:00
{{define "index"}}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Translate</title>
<link rel="stylesheet" href="/static/style.css" />
</head>
<body>
<h1 class="title">Translate</h1>
<form action="/" method="POST" class="form">
<label class="form__item form__field">
Source language: <input class="form__input" name="from" placeholder="en,de" value="{{.From}}">
</label>
<label class="form__item form__field">
Translate to: <input class="form__input" name="to" placeholder="fr,ru" value="{{.To}}">
</label>
<textarea name="text" class="form__item form__input textarea" placeholder="Text to translate">{{.Text}}</textarea>
<button type="submit" class="form__item form__button">Translate!</button>
<pre class="form__item translation">{{.Translation}}</pre>
</form>
</body>
</html>
{{end}}